Java

From FlashDevelop

Jump to: navigation, search

Contents

Description

Java is required for AS3 compilation with Flex SDK, AIR SDK or Apache Flex SDK and some other AS3 related tools. Also JavaScript compilation with closure compiler requires Java as does some other misc. tools in FlashDevelop depending on your target platform, as for example ANT.

Installing

You need to install 32-bit Java 1.6+ and add Java path to your PATH environment variable, JAVA_HOME environment variable or to bin/jvm.config or build.properties file in the SDK. Generally speaking the new AIR SDK with ASC 2.0 should work with any 32-bit Java and Flex SDK (Apache too) requires 1.6+ 32-bit Java with few errors that may need a workaround.

Path resolution

FlashDevelop resolves Java binary (java.exe) location and arguments the following way:

1. Looks inside the SDK for bin/jvm.config or build.properties file to get user-defined arguments:

2. Looks for JAVA_HOME environment variable. Path to Java installation, without "\bin" at the end.

3. Calls the default Java executable in the PATH environment variable. You should add Java bin directory,
ie. "C:\Program Files (x86)\Java\jre6\bin", to your PATH environment variable.

Possible errors

Error when compiling:

Error: null

Reason: An unknown error has been encountered in the compiler.

Error when compiling:

Error: Comparison method violates its general contract!

Reason: Comparison error has been encountered in the compiler.

Error when debugging:

System.DllNotFoundException: Unable to load DLL 'jvm.dll'.

Reason: Java can't find the necessary dependency DLLs.

Error when debugging:

System.BadImageFormatException: An attempt was made to load a program with an incorrect format.

Reason: You have incorrect version of Java installed or wrong Java is pointed to the SDK.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox