Skip to content
Advertisement

Error:java: invalid flag: -release

I use Java :

JavaScript

and IntelliJ IDEA:

JavaScript

Get error when compiling:

JavaScript

Executing javac -help :

JavaScript

So javac should use two hyphens with release, but Intellij Idea use with one.

Can I override javac options that IDEA use or fix it in some way?

UPD: Even Build, Execution, Deployment > Compiler > Java Compiler Additional Command Line Parameter doesn’t help in this case

Advertisement

Answer

Java 9 support is cutting edge and should be tried with the most current version. At the moment, this is the public preview of 2016.3, available here.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement