I recently downloaded JDK 1.8.0.0_06 that comes bundled with NetBeans. I then got to find out that my JavaFx project, that I have been developing in Java 1.7 won't compile in Java 1.8, and so I stepped down my JDK to 1.7. Still I can't get it to work/ compile. I get this error:
javac: invalid target release: 1.8 Usage: javac <options> <source files>
I'm really stuck and would greatly appreciate any help.
Fix invalid target release error by changing Maven's Java version. You need to install a newer JDK and then update JAVA_HOME or PATH environment variables.
To Solve Error:java: invalid target release: 11 Error To resolve this issue I've changed File->Project Structure->Modules ->> Language level to 10. And check File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler ->> Project bytecode and Per-module bytecode versions.
The problem is that there is mismatch in the Java/JDK versions. The project is trying to use a particular Java version to build the project. However, the system doesn't support the Java version the project is intended to build upon. First things first, decide on which Java/JDK version you want to use.
For IntelliJ14 you may have to change the bytecode version w.r.t. the JDK you are using (in the global settings):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With