Specifying Compilation Settings
Compilation output locations
By default, the results of compilation are output to:
At the project level, you can change the
<ProjectFolder>/out part of the output path. If you do so (say, specify some
<OutputFolder> instead of
<ProjectFolder>/out) but don't redefine the paths at the module level, the compilation results will go to
At the module level, you can specify any desirable compilation output location for the module sources and tests individually.
Specifying compilation output folders
Configuring compiler settings
You can modify the list of recognized resources, exclude certain paths from compilation, select the desired compiler, configure annotation processing, etc.
- Open the Settings / Preferences dialog (e.g. Ctrl+Alt+S).
- On the Compiler page (the Build, Execution, Deployment section), you may want, for example, to modify the regular expression that describes the extensions of the files to be recognized as resources (the Resource patterns field). Use semicolons (
;) to separate individual patterns. See the list of wildcard characters and examples.
- On the Excludes page, specify the files and folders that shouldn't be included in compilation. Use to add items to the list.
- If an excluded path is a dependency of the source code being compiled, this path will be included in compilation and processed by the compiler as required.
- If a file contains errors and fails to compile, but it is not important for the current project state, or if you want to skip some files and not to include them in the output directory, you can exclude such files from compilation.
- On the Java Compiler page, check if the compiler being used is the one that you want. If necessary, select a different compiler.
- On the Annotation Processors page, configure the annotation processing parameters.
- Apply the changes and close the dialog.