In this post, we will see how to change java version in intellij.
Steps to change java version in intellij IDEA
Here are steps to change java version in Intellij
- Go to
If you prefer keyboard shortcuts:
Windows: Ctrl + Shift + Alt + S
Mac: CMD + ;
Following pop up will be displayed in intellij.
- Navigate to
SDKand add JDK.
If you have already configured JDK, then select the JDK.
- Go to
Project language levelto previously added java version
Once you change the JDK version, project will start reindexing its source files and libraries to ensure all JDK features are in sync.
- Naviage to
💡 Did you know?
Please note that when you change java version in intellij, it will only be used by intellij. If you run the java program via command line, then it will use
It won’t also change JVM used by build tools such as maven or gradle.
That’s all about how to change java version in intellij.