Specifying the Default Compiler for a File

When you assign a compiler to an individual class, that class is not affected when you change the default compiler for the project that the file is in.

To change the default compiler for a file:

  1. Right-click the file in the Explorer and choose Properties

  2. In the Properties window, click the Execution tab.

  3. Click the value for the Compiler property and choose a compiler from the combo box. The default compilers are described below. (Your IDE might include additional compilers, depending on the modules you have installed.)
    FastJavac Compilation The fastjavac provided with the IDE. fastjavac is a native compiler--there are different versions of fastjavac for each platform, but each version compiles into the same Java bytecode. An advantage of running fastjavac is speed.
    Internal Compilation The javac compiler that runs within the same virtual machine as the IDE. javac is a cross-platform compiler. The advantages of running javac internally are speed, the changes in the class structure appear immediately in the Explorer window, and the status bar provides information on the dependent classes that are compiled.
    External Compilation The javac compiler run in a virtual machine outside the IDE. By default, the file uses the javac compiler provided with the JDK.
    (do not compile) The name of the file is not passed to the compiler. If another class is dependent on the class, the compiler may include the disabled class in that compilation.
To change the default compiler for multiple files, select the classes while holding down the CTRL key (or the SHIFT key to select a range of classes), then modify the Compiler property in the Properties window.
For more information on javac, see http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javac.html.
See also
Specifying the Default Compiler for a Project

Defining a New Compiler Type

Legal Notices