Tips On Solving The Error “Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate”

IntelliJ IDEA Ultimate is one of the most popular Java IDE. But sometimes, when you run IntelliJ IDEA, it shows you an error. The error message is “Error: java: error: release version 5 not supported in IntelliJ IDEA Ultimate”. This blog will show you different methods to solve this error.

How To Fix The Error “Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate”?

You may get the following problem when attempting to run a basic java maven project in IntelliJ IDEA Ultimate today.

Error:java: error: release version 5 not supported

Open your IDE settings to resolve the “Error:java: problem: release version 5 not supported in IntelliJ IDEA Ultimate” error. Then, navigate to Build Execution, Deployment. Then, choose Compiler. Next, simply scroll down to Maven and java compile. The modules’ selection and related java compile version “target bytecode version” will appear in the right panel. Choose a version greater than 1.5. If a JDK is not accessible, you may have to update it. Build, Execution, and Deployment Preferences -> Compiler -> Java Compiler -> Target bytecode version Setting this value resolved the issue for you.

Option 1: Upgrade the target bytecode version.
  1. Open your IDE Preferences.
  2. Then, choose Build Execution and Deployment.
  3. Then, choose Compiler.
  4. Next, simply scroll down to Maven and Java Compilation.
  5. A set of modules and related java compile version “target bytecode version” will appear in the right panel.
  6. Choose a version greater than 1.5.
  7. When a jdk is not accessible, you may have to update it.
  8. Build, Execution, and Deployment Preferences -> Compiler -> Java Compiler -> Target bytecode version Setting this value resolved the issue for me.
Option 2: Include this code in the build plugin’s POM file.
<properties>
        <java.version>1.8</java.version>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
 
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
Option 3: Attempt to upgrade the Java version.

First, in pom.xml, configure your language level/release versions as shown.

<properties>
  <maven.compiler.source>1.8</maven.compiler.source>
  <maven.compiler.target>1.8</maven.compiler.target>
</properties>
Then, simply try changing the Java version.
  1. Navigate to File -> Project Structure -> Project -> Then Project SDK -> Set it to 11
  2. Navigate to File -> Project Structure -> Choose Project -> Set the Project language level to 11 by selecting it from the drop-down menu.
  3. Navigate to File -> Project Structure -> Choose Project -> Choose Modules, then Sources, and then change it to 11.
  4. Navigate to Settings -> Accessible Build, Execution, Deployment -> Choose Compiler -> Then, Java Compiler -> Finish by changing the bytecode version of the project to 11
  5. Navigate to Settings -> Access Build, Execution, Deployment -> Choose Compiler -> Then Java Compiler -> Finish by setting it to 11 by selecting Module.

Conclusion

We hope you found our blog post on how to fix the error “Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate” helpful. If you have any further queries or concerns about this topic, please leave a comment. Thank you for reading; we are always glad when one of our articles provides useful knowledge on this subject!


Related articles
Scroll to Top