Compiler Options

This panel allows to specify common options of javac-compatible compilers and (Win32 only:) "jvc" compiler settings.

It is possible to specify additional cline options (such as "-J-mx64m" to increase javac's upper memory consumption limit).

Also important is the working directory the compiler is run with. Complicated package and naming conflicts may arise if the compiler runs with a wrong working directory. We generally recommend to specify "/" or "\" as working directory for the compiler. This leads to absolute filenames in all errormessages of the compiler, and in addition prevents some strange problems which may pop up especially if you use '.' in your classpath. Of course,'.' must be replaced by an absolute directory in the classpath if "\" is used as working directory.


By specifying an output directory it is possible to create .class files separate from your sources. This is useful in various ways.
"Build Changed" (F7) respects this setting, of course. Note that it is usually necessary to include the output directory into the classpath.

Tip: To edit a textfield as a file, directory, or path, choose "Edit as .." from the TextFields PopupMenu.

Using other compilers than Javac
The program which is executed when the compiler is called up can be specified in Global Properties. This enables you to specify other (javac compatible) compilers than javac.

How to use IBM's Jikes compiler
A tested stable release of the Jikes compiler is delivered with AnyJ. Note that former versions of jikes caused problems, since some debug-vm's crashed when running Jikes compiled code.
  1. set Options.Properties "File.javac" to "[anyjdir]\bin\jikes\jikes.exe"
  2. in the "Compile Options" panel set the field "additional CLine options" to "+E" (Emacs compatible error messages).


How to use the MS-jvc compiler (Win32 only)
AnyJ contains special support for the JVC compiler included in the Microsoft SDK for Java. Since jvc needs different commandline arguments than javac it can not be supported in a generic manner.
  1. Download and install the MS-JDK for Java.
  2. set the "Use MS-jvc" to true.
  3. Note that the jvc compiler needs its own classes.zip in the classpath, respectively you can skip it in the classpath to force jvc to use default. Trying to compile with jvc using a JDK-classes.zip usually results in "class java.lang.Thread not found" or something similar.