How to Change the Intellij Idea Default Jdk

How do I change the IntelliJ IDEA default JDK?

This setting is changed in the "Structure for New Projects" dialog. Navigate to "File" -> "New Projects Setup" -> "Structure..."

Selecting Structure For New Projects

Next, modify the "Project SDK" and "Project Language Level" as appropriate.

Selecting Project Language Level


Previous versions of IntelliJ IDEA had this setting in "File" -> "Other Settings" -> "Default Project Structure...".

IntelliJ IDEA 12 had this setting in "Template Project Structure..." instead of "Default Project Structure..."

How to change project's java version in Intellij Idea?

File | Project Structure

Add your new SDKS, and chose right sdk for your Project.

IntelliJ: Cannot change Java version

JDK version in the IDE Terminal is the same as in your system terminal and is not controlled by the IDE settings. If you need to change the default JDK used in the terminal, use the system environment settings and adjust the PATH (and optionally JAVA_HOME) environment variables instead. Then logout/login or reboot for the changes to have effect.

If you want to change the JDK only for IntelliJ IDEA Terminal and keep using Java 17 in the system terminal, you can override PATH environment at Settings (Preferences on macOS) | Tools | Terminal | Project Settings | Environment variables.

Windows users can check this related answer for the detailed steps how to change the system default JDK.

How to change Java version for Maven in IntelliJ?

Or easier, add this to your pom's properties section:

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

JDK version mismatch between Intellij project structure and Maven version

Try and change in Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Runner -> JRE to use JDK 8 or even better set the JAVA_HOME to the JDK 8

IntelliJ terminal jdk setting

I repost the answer of @yole from the comments. It is not possible.

How do I set up my IntelliJ IDEA environment for JDK8 development?

Under File/Project structure under the Project section each project has its JDK configured by a dropdown. Select the one you want to use and you should be done.

The same section have a project language level, which you probably want to make sure it is "SDK default" which means if you pick java 8 as the project SDK, you will also get to use java 8 features such as lambdas.

The available JDKs are configured globally (one-time operation). I usually add one for each major java version, and edit it when I upgrade to a later update.

Unless you have modules within your project that uses different java versions, you can leave the module settings to defaults.

Hope this helps.

how to add jdk9 to intellij IDEA?

Your question is poorly researched and you should put in more effort when asking on StackOverflow. Still, you're new, so here's a freeby:

  • download IntelliJ, at least 2017.1.2, better 2017.2.1
  • download and install/unpack JDK 9
  • add it as SDK (software development kit) to IntelliJ
  • create a new project and set JDK 9 as SDK
  • make sure project language level is set to 9


Related Topics



Leave a reply



Submit