Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 16, 2020 01:25 am GMT

IntelliJ - Error:java: release version 5 not supported

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 to resolve this. Try them in order. If one doesn't resolve the issue, try the next.

1. Update Java Compiler

  • Go to IntelliJ IDE menu item (or File on Windows) -> Preferences -> Build, Execution, Deployment -> Java Compiler

  • Delete value under Target bytecode version, then click OK

  • Refresh maven

  • Try running again. If problem persists, continue on to number 2 below

2. Update SDK Version

  • Go to File -> Project Structure -> Project Settings -> Project. Make sure you have the correct Java version selected. It should be the same as the one you downloaded

  • Also on this same panel, go to Platform Settings -> SDKs. Make sure you have the correct Java version selected

  • Click OK

  • Refresh maven

  • Try running again. If problem persists, continue on to number 3 below

3. Add property to pom.xml

  • Within IntelliJ, open pom.xml file

  • Add this section before <dependencies> (If your file already has a <properties> section, just add the <maven.compiler...> lines below to that existing section):

   <properties>       <maven.compiler.source>1.8</maven.compiler.source>       <maven.compiler.target>1.8</maven.compiler.target>    </properties>
  • Change the x in 1.8 to your Java version. For example, if youre using Java 13, change 1.8 to 1.13

  • Refresh maven

  • Try running again

Original Link: https://dev.to/techgirl1908/intellij-error-java-release-version-5-not-supported-376

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To