Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to run my simple java maven project in my IntelliJ IDEA Ultimate And I am facing the following error Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate Occurs ?
Today I am just trying to run my simple java maven project in my IntelliJ IDEA Ultimate And I am facing the following error.
Error:java: error: release version 5 not supported
How To Solve Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate?
Solution 1: Change target bytecode version
- Open Your IDE Setting.
- Then Open Build Excecution, Deployment
- Then Select Compiler.
- Then Just Scroll down to Maven and java compile
- In the right panel will be a list of modules and their associated java compile version “target bytecode version.”
- Select a version >1.5.
- You may need to upgrade your jdk if one is not available.
- Preferences > Build, Execution, Deployment > Compiler > Java Compiler > Target bytecode version. Setting this value fixed the error for me
Solution 2: Add this code in build plugin in 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>
Solution 3 : try to change the Java version
Here First of all set the language level/release versions in pom.xml Like this.
<properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties>
Then Just try to change the Java version.
- Go to File -> Select Project structure -> Select Project -> Then Project SDK -> set It to 11
- Go to File -> Select Project structure -> Select Project -> Select Project language level -> set to 11
- Go to File -> Select Project structure -> Select Project -> Select Modules -> select Sources -> set it to 11
- Go to setting -> Open Build, Execution, Deployment -> Slect Compiler -> Then select Java Compiler -> Change Project bytecode version to 11
- Go to setting -> Open Build, Execution, Deployment -> Slect Compiler -> Then select Java Compiler -> Select Module -> Change it to 11
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- SyntaxError: invalid syntax to repo init in the AOSP code.