IntelliJ IDEA 13.1.0 Web Help

File | Settings | Compiler - Java Compiler

Use the Compiler > Java Compiler page to choose the Java compiler, specify version of the generated bytecode, and the compiler settings for the selected compiler.

In this section:

Compiler

Item Description
Use compiler Select the desired compiler from the list of the supported ones:
  • Javac. This compiler is taken from the Java SDK currently assigned to the project.
  • Eclipse. IntelliJ IDEA comes bundled with the Eclipse compiler.
  • Ajc. This compiler is not included in IntelliJ IDEA distribution and should be downloaded separately.

    Note that this compiler is shown in the list only if the AspectJ Support plugin is enabled.

Project bytecode version Select version of the generated bytecode from the drop-down list. The project bytecode version is used, when no bytecode version is defined for an individual module.
If the field is left blank, then the default version defined by the compiler is used.
Per-module bytecode version This compilation parameter makes it possible to define the version of the generated bytecode for each module of a project.

Click add to select a module from the Choose module dialog box.
In the Target bytecode version column, select the desired version from the drop-down list.

Click delete delete the selected module from the list.

Compiler settings for Javac and Eclipse

Item Description
Generate debugging info If this check box is selected, the compiler includes the information necessary for running the compiled classes in the debugger.
Report use of deprecated features If this check box 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 check box is selected, the compiler omits the warnings about dubious usages of language constructs.
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 shift-enter-button to open the Additional command line parameters dialog where the text entry area is larger.

When specifying the parameters and options, follow these rules:

  • Use spaces to separate individual parameters and options, for example, -client -ea -Xmx1024m.
  • If a parameter or an option includes spaces, enclose the spaces or the argument that contains the spaces in double quotes, for example, some" "arg or "some arg".
  • If a parameter or an option includes double quotes (e.g. as part of the argument), escape the double quotes by means of the backslashes, for example, -Dmy.prop=\"quoted_value\".
Maximum heap size (MB) The heap size available to the process that launches the compiler.

If you are compiling a particularly large or complex project, you may get out-of-memory errors and be required to increase the amount of memory allocated to the compiler.

Compiler settings for Ajc

Item Description
Path to Ajc compiler Specify the path to Ajc (the file aspectjtools.jar which is located in <AJDK installation directory>\lib).

Type the path in the field, or click browseButton and select the required file in the dialog that opens.

Maximum heap size (MB) If necessary, specify the maximum heap size for the compiler. (The default is 128 MB.)
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 shift-enter-button to open the Command line parameters dialog where the text entry area is larger.

When specifying the options, follow these rules:

  • Use spaces to separate individual options, for example, -client -ea -Xmx1024m.
  • If an option includes spaces, enclose the spaces or the argument that contains the spaces in double quotes, for example, some" "arg or "some arg".
  • If an option includes double quotes (e.g. as part of the argument), escape the double quotes by means of the backslashes, for example, -Dmy.prop=\"quoted_value\".

Note that the aspectpath option may be specified separately, using the GUI provided below.

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 -version parameter.)

Explicit aspect path If you want to specify the aspectpath option, select this check box, and then use the available controls (see below) to form the aspectpath.
Item Keyboard Shortcut Description
add Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertCommand N or Control EnterControl N or Control EnterCommand N or Control Enter Use this icon or shortcut to add project and global libraries to the list. Select the necessary library or libraries in the Choose Libraries dialog that opens.
delete Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteCommand DeleteCommand DeleteCommand Delete Use this icon or shortcut to remove the selected items from the list.
arrowUp Alt+UpAlt+UpAlt+UpAlt+UpAlt+Up or Ctrl+Alt+AAlt+UpAlt+UpCtrl+Alt+UpCtrl+Shift+UpControl UpControl UpControl Alt Up Use this icon or shortcut to move the selected item one line up in the list.
arrowDown Alt+DownAlt+DownAlt+DownAlt+DownAlt+Down or Ctrl+Alt+EAlt+DownAlt+DownCtrl+Alt+DownCtrl+Shift+DownControl DownControl DownControl Alt Down Use this icon or shortcut to move the selected item one line down in the list.

See Also

Concepts:

Procedures:

Web Resources: