Java Compiler
for macOS
On the Compiler | Java Compiler page, you can select the Java compiler to be used and specify associated options.
Compiler and bytecode versions
Item | Description |
---|---|
Use compiler | Select the compiler to be used:
|
Use '--release option' for cross-compilation (Java 9 and later) | By default, this option is selected. IntelliJ IDEA deduces from project settings when the cross-compilation is needed and automatically applies the --release compiler option for Java 9. |
Project bytecode version | Select the version of bytecode to be generated. (Roughly, this is the minimum target JVM version.) If no particular version is specified, the bytecode version is defined by the compiler. To specify different versions for particular modules, use the controls in the Per-module bytecode version area. |
Per-module bytecode version | If necessary, specify the target bytecode versions for individual modules (for example if they should differ from that set for the project ). Click and select the modules of interest in the dialog that opens. Then, for each of the modules, click the corresponding Target bytecode version cell and select the version from the list. Use to remove the selected module or modules from the list. |
Javac and Eclipse options
Item | Description |
---|---|
Use compiler from module target JDK when possible | For the Javac compiler: When this option is on and the version of the JDK associated with a module is different from that of the build process JDK, the compiler from the module JDK is used. The exception is when the version of the module JDK is earlier than 1.6. In such cases, the compiler from the build process JDK is used in the cross-compilation mode against the classes of the module JDK. When the option is off, all the modules are compiled with the same compiler, the one from the build process JDK. When necessary, the cross-compilation mode is used. To start the build process, the latest of the available JDKs is used. This JDK is chosen from all the JDKs used in your modules, the default project JDK, and also the JDK bundled with IntelliJ IDEA. IMPORTANT! The choice of the compiler does not affect the source code language level, and also the bytecode target level and linking. That is, irrespective of which compiler is used, the bytecode is linked against the JDK associated with the module, and the resulting code levels are exactly the ones that are specified in your project settings. |
Generate debugging info | If this checkbox is selected, the compiler generates the information necessary for running the compiled classes in the debugger. |
Report use of deprecated features | If this checkbox is selected, the compiler displays warnings about the deprecated methods, classes, or fields encountered during compilation. (The corresponding warnings are shown in the compiler output window.) |
Generate no warnings | If this checkbox is selected, the compiler omits the warnings about dubious usages of language constructs. |
Proceed on errors | For the Eclipse compiler: If you select this checkbox, the compiler continues the compilation even when compilation errors occur. |
Path to ECJ batch compiler tool (leave empty to use bundled) | For the Eclipse compiler: Use this option if you need to specify a particular version of the Eclipse compiler. |
Additional command line parameters | Specify the command-line parameters and options to be passed to the compiler at its start. Refer to the compiler documentation for the available options. If you need more room to type, click to open the Additional command line parameters dialog where the text entry area is larger. When specifying the parameters and options, follow these rules:
|
Ajc options
Item | Description |
---|---|
Path to Ajc compiler | Specify the path to ajc (the file aspectjtools.jar which is located in <AspectJ installation directory>\lib ). Type the path in the field, or click and select the required file in the dialog that opens. |
Test | Click this button to check if the path and the command line parameters are correct. If all is well, the compiler version is displayed. Otherwise, an error message is shown. (Using the path and the parameters specified, IntelliJ IDEA tries to launch the compiler with the additional |
Command line parameters | If necessary, specify the command-line options to be passed to the compiler. You can type the parameters right in the field, or click to open the Command line parameters dialog where the text entry area is larger. When specifying JVM options, follow these rules:
NOTE: The specified parameters are ignored when ajc is used for post-compile weaving. See also, Optimize compilation performance: Use ajc in combination with javac, Controlling the ajc aspectpath and Fine-tune the use of ajc at a module level. |
Generate debug info | If this checkbox is selected, the compiler generates the information necessary for running the compiled classes in the debugger. |
Delegate to Javac | If this option is off, ajc is used in all cases. If this option is on, javac is used in addition to or instead of ajc. For example, javac will be used to compile the modules that contain no aspects. As a result, the compilation may become much faster. See also, Optimize compilation performance: Use ajc in combination with javac and Fine-tune the use of ajc at a module level. |
Groovy-Eclipse options
Item | Description |
---|---|
Path to groovy-eclipse-batch jar | Specify a path to your groovy-eclipse-batch jar location. Click and specify the path to the jar file and click OK. Note that it is necessary to enter the location of the groovy-eclipse-batch jar file for the compiler to work correctly. |
Additional command line parameters | Specify the command-line parameters and options to be passed to the compiler at its start. Refer to the compiler documentation for the available options. If you need more room to type, click to open the Additional command line parameters dialog where the text entry area is larger. When specifying the parameters and options, follow these rules:
|
Generate debug info | If this checkbox is selected, the compiler generates the information necessary for running the compiled classes in the debugger. |