
Today while running my Java Program I got below error in IntelliJ IDEA.
Information:Too many modules require recompilation, forcing full project rebuild Information:java: Errors occurred while compiling module 'CrunchifyTutorial' Information:javac 11 was used to compile java sources Information:7/19/20, 10:46 AM - Build completed with 1 error and 0 warnings in 2 s 331 ms Error:java: error: release version 14 not supported
In addition to above problem, do you have any of below errors?
- IntelliJ IDEA 2020.1 unable to compile with java 7
- Error:java: invalid source release: 8 in Intellij. What does it mean?
- Cannot compile to Java 8 with Java 11
- Intellij insists on compiling with javac 11.0.3 instead of Java 9
- IntelliJ IDEA tells me “Error:java: Compilation failed: internal java compiler error idea”
Then you are at right place.
Let’s get started on solving this error:
Step-1)
Make sure you have latest Java installed
on your laptop/desktop. In my case, instead of installing Java I usually download full JDK binary and put it on my host.
Visit URL: https://www.oracle.com/java/technologies/javase-downloads.html
to download latest JDK.


Step-2)
Let’s install and set latest Java in your IntelliJ IDEA.
- Right click on
Project
- Click on
Open Module Settings
- Click on
Project
->Project SDK
- Click on Dropdown
- Click on
Add SDK
- Provide path of latest downloaded Java JDK
- Click on
Project language
level - Set it to
14 - Switch expressions





By doing this, you have setup Java 14 correct way on your IntelliJ IDEA.
Step-3)
- Go to IntelliJ IDEA
- Click on Preferences
- Go to Build, Execution, Deployment -> Compiler -> Java Compiler
- Make sure below settings are set correctly
- Use compiler: Javac
- Project bytecode version: 14
- Target bytecode version: 14 (for your module/project)
- Click save

Step-4)
- Right click on Project
- Click on Open Module Settings
- Click on Project Settings
- Click on Modules
- Make sure you select your project. In my case it’s CrunchifyTutorial
- Click on Language level:
- Select 14 – Switch expressions
- Click Save

Step-5)
Now re-run your project and it should run without any issue.
Rebuild Project:

Information: Too many modules require recompilation, forcing full project rebuild Information: javac 14.0.2 was used to compile java sources Information: 7/19/20, 12:09 PM - Build completed successfully in 2 s 310 ms
Run Sample Java Program:
/Users/crunchify/Desktop/installation/jdk-14.0.2.jdk/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=63228:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/crunchify/Documents/C/crunchify-github/CrunchifyTutorial/target/classes crunchify.com.tutorials.CrunchifyJava14 Hey.. You have setup Java 14 successfully in IntelliJ IDEA Process finished with exit code 0
Please let me know if you have any other issue running Java program in your IntelliJ IDEA. We will try to provide answer at earliest convenience.