What is the "Use" --release "option in IntelliJ 2018.1 settings?
In the settings for IntelliJ 2018.1 (build, run, deploy> Compiler> Java Compiler), the checkbox is checked:
Use the --release option to cross compile (Java 9 and later)
I found information while doing an online search. "?" help icon gives 404 error when clicked.
What is the purpose / function of this option?
The help section can be found here :
By default, this option is selected. IntelliJ IDEA deduces from project settings when cross-compilation is necessary and automatically applies the -release compiler option for Java 9.
What is the --release ? This is a new command line option defined in JEP 247: Compilation for older versions of the platform .
A new command line parameter is
--release, which automatically configures the compiler to create class files that will be associated with the implementation of this version of the platform.
A good answer is discussed here .
Also check IDEA-184333 for the background, why this option was added to the IDE. In short, some users only need to specify versions of -source and -source for their projects, without also setting the -bootclasspath parameter.
