The Java Compiler Action invokes the javac compiler which is included in the Sun Java JDK. It also supports invoking other java compilers such as Embarcadero Java Compiler and IBM Jikes.

On this page:

 

Options

Java Compiler Options

Base Directory

The current directory when the compiler is invoked.

Source Path

Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by semicolons (;) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. Classes found through the classpath are subject to automatic recompilation if their sources are found.

Destination Directory

Sets the destination directory for class files. The destination directory must already exist; javac will not create the destination directory. If a class is part of a package, javac puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify -d c:\myclasses and the class is called com.mypackage.MyClass, then the class file is called c:\myclasses\com\mypackage\MyClass.class.

If not specified, javac puts the class file in the same directory as the source file.

The directory specified is automatically added to your user class path.

Source Files

One or more source files to be compiled (such as MyClass.java).

JDK/Compiler

The JDK Config to use. See the JDK Configuration Section in the Options Dialog (under compilers).

Target

Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with the 1.2 VM in the Java 2 SDK. The versions supported by javac in the Java 2 SDK are:

1.1 Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK.

1.2 Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs. This is the default.

1.3 Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs.

1.4 Generate class files that are compatible only with 1.4 VMs.

Encoding

Disable Warning Messages

Verbose

Verbose output. This includes information about each class loaded and each source file compiled

Assertions

Enables support for compiling source code containing assertions. When Target is set to 1.4, the compiler accepts code containing assertions. Assertions were introduced in J2SE 1.4. When Target is set to 1.3, the compiler does not support assertions. Only valid if Assertions option enabled.

Deprecation

Show a description of each use or override of a deprecated member or class. Without -deprecation, javac shows the names of source files that use or override deprecated members or classes.

Generate Debug Info

Generates Debug info during the compile

Source

Source file debugging information  

Lines

Line number debugging information

Vars

Local variable debugging information

ClassPath

Set the user class path, overriding the user class path in the CLASSPATH environment variable. If neither CLASSPATH or -classpath is specified, the user class path consists of the current directory.

BootClassPath

Allows cross compilation using the bootstrap and extension classes of a different java platform implementation.

Extension Directories

Cross compile against the specified extension directories

Additional Arguments

Allows you to pass additional command line arguments to the compiler (ie arguments not exposed as properties of the action).

JVM Options

Allows you to specify arguments that will be passed to the jvm when it is invoked.

  • No labels