A common error in IntelliJ when attempting to run a new Java maven project is Error:java: release version 5 not supported.
Here are 3 techniques t...
For further actions, you may consider blocking this person and/or reporting abuse
By default, your "Project bytecode version isn't set in maven project.
It thinks that your current version is 5, so just go to "Project Settings>Build, Execution...>compiler>java compiler" and then change your bytecode version to your current java version.
Have a good day :)
This is what fixed mine. Thank you very much, sir.
Thank you so much, it totally worked for me.
The proper solution for maven-based projects is to change the target version as shown by Angie in option 3. I added some background on the root cause and provided an additional example for spring boot projects and "plain" java projects here:
Proper solutions for error “java: release version 5 not supported”
Lars Opitz ・ Feb 16 ・ 4 min read
None of Angie's steps worked for me but setting build plugin in POM file like below worked for me .
11
"
org.apache.maven.plugins
maven-compiler-plugin
3.8.1
11
"
[Already Solved] Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate
There are many great answers here. If you imported your maven project from spring initializr, make sure the project is set to your your java version. In my case Java 16.
Goto File > Project Structure > Modules
Select the project folder, next change the Language level to your Java version, apply and click OK.
Just a small hint. For JDK9+ you have to use
9or10etc. instead of1.Xcause1.Xdoes not exist for JDK9+.So for JDK13 you have to use
13instead of1.13...Thanks a lot Angie Jones, this helped me to solve my problem.
New to Maven, and this indeed bit me. Changing the targeted release in the POM file un-confused Intellij (per your option 3) -- thank you!
This problem usually happen when you create new project in InteliJ. To solve this problem you can follow this video step by step:
youtu.be/ijhk7eLbizM
Sorry for my bad english.
Thank you Angie so much!!! I loved your tips, my problem was on the pom.xml
Thanks! This works like a charm.
Adding maven properties helped! Thanks for this article Angie :D
Thanks for this fixed, your topic help me very much.
Thanks, step 2 fixed mine. Thank you very much.
thank you so much! you really saved me
Thank you, Angie. New to Maven and new to IntelliJ; option 3 did it for me.
How can I Fixx this ???????
Thank you!
Thank you :)
very much helpful.
Thx Angie..... the third solution worked for me. Tried all of them but finally success with the third one. Thx
Thank you Angie, the last step worked for me.
For me, adding the property to pom.xml saved the day. Thanks for sharing!
Nice tip with the Java Compiler setup. Thanks.
Step 3 worked like a charm for me. Thank you!
Thanks a lot!
Maven by default always targets JRE 5. You should always configure the correct Java version as you have shown in the pom.xml
Yeah I had the same problem, Why don't the ItelliJ just add these things by itself.
Android studio is so nice to work with everything is auto.
Wow works magically!
The third option worked. Thank you!
Angie solution number 3 worked fine for me!
thanks Angie!
A terceira opção funcionou. Obrigado! The 3th option worked. Thanks.
It works!
That's right, thank you very much, the third recommend of Angie, it worked for me.