In IntelliJ, I\'m getting this strange error message when I try to build from the build menu
Error: java: release version 10 not supported
At first, Put this code in your pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>Current Latest Version of Maven e.g. 3.8.1</version>
<configuration>
<target>Java Version installed in your system e.g. 13</target>
<source>Java Version installed in your system e.g. 13</source>
<release>Java Version installed in your system e.g. 13</release>
</configuration>
</plugin>
</plugins>
</build>
And Also Go to File> Settings > Build, Execution, Deployment > Compiler> Java Compiler and change "Project bytecode version" to Java Version installed in your system e.g. 13
Resolved issue in File -> Project Strucuture.
Changed Project Language Level to 11.
IntelliJ Issue
I had similar issue except that the error was "release version 5 not supported. " I tried all of the above and other proposed solutions but nothing worked, except putting following xml into the pom.xml file:
<properties>
<maven.compiler.release>11</maven.compiler.release>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Code comes from: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
After putting this code in pom.xml, make sure to Import Changes or Enable Auto-Import for the Maven project:
One more option you can try, go to Maven and check which JRE version it is fetching.I solved my issue by fixing it. I had HDK 14 but it was considering 11.
The most upvoted answer really helped me. However, for me the problem wasn't the Project bytecode version. Instead, my Maven module was marked with Target bytecode version 1.5, see picture below.
Just clicking the row and removing it fixed the problem:
I got this message Java error version 12 is not supported. and I am using 11.
How did I managed to solve this issue? Go to File --> Project Structure --> Project and Change the Project Language Level to the version that you have and click and apply.