IntelliJ: Error: java: release version 10 not supported

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: Maven in 5 Minutes | Apache Maven Project

After putting this code in pom.xml, make sure to Import Changes or Enable Auto-Import for the Maven project:

Intellij popup box


I got a similar error but did not use Maven.

It's resolved by updating the IntelliJ configuration:

  • File -> Settings-> Build, Execution, Development -> Compiler -> Java Compiler
  • update Project bytecode version to 8

enter image description here