I use IntelliJ IDEA as my development environment, and Maven for dependency management. I frequently build my project structure (directories, poms, etc) outside of IDEA and then import the project into IDEA using Import project from external model. This works great, except that in my poms I specify that the maven-compiler-plugin should use JDK 1.6, and when I import, IDEA informs me that the Language Level Changed and that Language level changes will take effect on project reload, and then prompts to reload the project. This is annoying because I always use the same JDK version.
How do I change the default JDK that IntelliJ IDEA uses, so that I don’t have to reload my project every time I import a new project?
asked Sep 24, 2013 at 16:34
This setting is changed in the «Structure for New Projects» dialog. Navigate to «File» -> «New Projects Setup» -> «Structure…»
Next, modify the «Project SDK» and «Project Language Level» as appropriate.
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…»
3
Download and unpack a JDK archive file (.tar.gz) and add it as a SDK in the ‘Project Structure’ dialog box ( Ctrl+Alt+Shift+S )
click on the gif to enlarge
Also make sure to set an appropriate ‘Project language level’. I forgot to do that when creating the GIF.
Project Structure > Project > Project language level
For Java 8 set it to 8, for Java 9 set it to 9, and so on.
answered Mar 5, 2018 at 7:55
Gayan WeerakuttiGayan Weerakutti
11.1k1 gold badge67 silver badges66 bronze badges
- I am using IntelliJ IDEA 14.0.3, and I also have same question. Choose menu
FileOther SettingsDefault Project Structure...
- Choose
Projecttab, sectionProject language level, choose level from dropdown list, this setting isdefault for all new project.
answered Feb 14, 2015 at 15:36
I have found out that in recent versions of IntelliJ IDEA requires Java 1.8 but is not configured by default.
We can change the path or configure from Project Settings > Project > Project SDK
here we can edit or add the JDK´s path.
(in my case the path is located in C:Program FilesJavajdk1.8.0_102)
answered Feb 1, 2017 at 17:49
JorgesysJorgesys
123k23 gold badges328 silver badges264 bronze badges
Change JDK version to 1.8
- Language level File -> project Structure -> Modules -> Sources -> Language level -> 8-Lambdas, type annotations etc.
-
Project SDk File -> project Structure -> Project 1.8
-
Java compiler File -> Settings -> Build, Executions, Deployment -> Compiler -> Java compiler
answered May 3, 2016 at 7:47
ethemsulanethemsulan
2,20126 silver badges19 bronze badges
1
One other place worth checking: Look in the pom.xml for your project, if you are using Maven compiler plugin, at the source/target config and make sure it is the desired version of Java. I found that I had 1.7 in the following; I changed it to 1.8 and then everything compiled correctly in IntelliJ.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
Rich
15.5k15 gold badges77 silver badges125 bronze badges
answered Apr 3, 2017 at 21:45
barclaybarclay
4,3329 gold badges49 silver badges67 bronze badges
The above responses were very useful, but after all settings, the project was running with the wrong version. Finally, I noticed that it can be also configured in the Dependencies window.
Idea 2018.1.3 File -> Project Structure -> Modules -> Sources and Dependencies.
answered May 19, 2018 at 10:00
knollmajknollmaj
511 silver badge2 bronze badges
To change the JDK version of the Intellij-IDE himself:
Start the IDE -> Help -> Find Action
than type:
Switch Boot JDK
or (depend on your version)
Switch IDE boot JDK
answered Aug 9, 2019 at 8:30
JavaJava
2,3391 gold badge10 silver badges22 bronze badges
3
For latest version intellij, to set default jdk/sdk for new projects go to
Configure->Structure for New Projects -> Project Settings -> Project SDK
answered Apr 17, 2020 at 15:42
MrKulliMrKulli
72510 silver badges18 bronze badges
2
I am using IntelliJ 2020.3.1 and the File > Other Settings… menu option has disappeared. I went to Settings in the usual way and searched for «jdk». Under Build, Execution, Deployment > Build Tools > Maven > Importing I found the the setting that will solve my specific issue:
JDK for importer.
answered Jan 27, 2021 at 14:24
cptullycptully
5036 silver badges24 bronze badges
On my linux machine I use a script like this:
export IDEA_JDK=/opt/jdk14
/idea-IC/bin/idea.sh
answered Jul 22, 2020 at 15:03
Marinos AnMarinos An
8,8115 gold badges54 silver badges92 bronze badges
I use IntelliJ IDEA as my development environment, and Maven for dependency management. I frequently build my project structure (directories, poms, etc) outside of IDEA and then import the project into IDEA using Import project from external model. This works great, except that in my poms I specify that the maven-compiler-plugin should use JDK 1.6, and when I import, IDEA informs me that the Language Level Changed and that Language level changes will take effect on project reload, and then prompts to reload the project. This is annoying because I always use the same JDK version.
How do I change the default JDK that IntelliJ IDEA uses, so that I don’t have to reload my project every time I import a new project?
asked Sep 24, 2013 at 16:34
This setting is changed in the «Structure for New Projects» dialog. Navigate to «File» -> «New Projects Setup» -> «Structure…»
Next, modify the «Project SDK» and «Project Language Level» as appropriate.
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…»
3
Download and unpack a JDK archive file (.tar.gz) and add it as a SDK in the ‘Project Structure’ dialog box ( Ctrl+Alt+Shift+S )
click on the gif to enlarge
Also make sure to set an appropriate ‘Project language level’. I forgot to do that when creating the GIF.
Project Structure > Project > Project language level
For Java 8 set it to 8, for Java 9 set it to 9, and so on.
answered Mar 5, 2018 at 7:55
Gayan WeerakuttiGayan Weerakutti
11.1k1 gold badge67 silver badges66 bronze badges
- I am using IntelliJ IDEA 14.0.3, and I also have same question. Choose menu
FileOther SettingsDefault Project Structure...
- Choose
Projecttab, sectionProject language level, choose level from dropdown list, this setting isdefault for all new project.
answered Feb 14, 2015 at 15:36
I have found out that in recent versions of IntelliJ IDEA requires Java 1.8 but is not configured by default.
We can change the path or configure from Project Settings > Project > Project SDK
here we can edit or add the JDK´s path.
(in my case the path is located in C:Program FilesJavajdk1.8.0_102)
answered Feb 1, 2017 at 17:49
JorgesysJorgesys
123k23 gold badges328 silver badges264 bronze badges
Change JDK version to 1.8
- Language level File -> project Structure -> Modules -> Sources -> Language level -> 8-Lambdas, type annotations etc.
-
Project SDk File -> project Structure -> Project 1.8
-
Java compiler File -> Settings -> Build, Executions, Deployment -> Compiler -> Java compiler
answered May 3, 2016 at 7:47
ethemsulanethemsulan
2,20126 silver badges19 bronze badges
1
One other place worth checking: Look in the pom.xml for your project, if you are using Maven compiler plugin, at the source/target config and make sure it is the desired version of Java. I found that I had 1.7 in the following; I changed it to 1.8 and then everything compiled correctly in IntelliJ.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
Rich
15.5k15 gold badges77 silver badges125 bronze badges
answered Apr 3, 2017 at 21:45
barclaybarclay
4,3329 gold badges49 silver badges67 bronze badges
The above responses were very useful, but after all settings, the project was running with the wrong version. Finally, I noticed that it can be also configured in the Dependencies window.
Idea 2018.1.3 File -> Project Structure -> Modules -> Sources and Dependencies.
answered May 19, 2018 at 10:00
knollmajknollmaj
511 silver badge2 bronze badges
To change the JDK version of the Intellij-IDE himself:
Start the IDE -> Help -> Find Action
than type:
Switch Boot JDK
or (depend on your version)
Switch IDE boot JDK
answered Aug 9, 2019 at 8:30
JavaJava
2,3391 gold badge10 silver badges22 bronze badges
3
For latest version intellij, to set default jdk/sdk for new projects go to
Configure->Structure for New Projects -> Project Settings -> Project SDK
answered Apr 17, 2020 at 15:42
MrKulliMrKulli
72510 silver badges18 bronze badges
2
I am using IntelliJ 2020.3.1 and the File > Other Settings… menu option has disappeared. I went to Settings in the usual way and searched for «jdk». Under Build, Execution, Deployment > Build Tools > Maven > Importing I found the the setting that will solve my specific issue:
JDK for importer.
answered Jan 27, 2021 at 14:24
cptullycptully
5036 silver badges24 bronze badges
On my linux machine I use a script like this:
export IDEA_JDK=/opt/jdk14
/idea-IC/bin/idea.sh
answered Jul 22, 2020 at 15:03
Marinos AnMarinos An
8,8115 gold badges54 silver badges92 bronze badges
I use IntelliJ IDEA as my development environment, and Maven for dependency management. I frequently build my project structure (directories, poms, etc) outside of IDEA and then import the project into IDEA using Import project from external model. This works great, except that in my poms I specify that the maven-compiler-plugin should use JDK 1.6, and when I import, IDEA informs me that the Language Level Changed and that Language level changes will take effect on project reload, and then prompts to reload the project. This is annoying because I always use the same JDK version.
How do I change the default JDK that IntelliJ IDEA uses, so that I don’t have to reload my project every time I import a new project?
asked Sep 24, 2013 at 16:34
This setting is changed in the «Structure for New Projects» dialog. Navigate to «File» -> «New Projects Setup» -> «Structure…»
Next, modify the «Project SDK» and «Project Language Level» as appropriate.
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…»
3
Download and unpack a JDK archive file (.tar.gz) and add it as a SDK in the ‘Project Structure’ dialog box ( Ctrl+Alt+Shift+S )
click on the gif to enlarge
Also make sure to set an appropriate ‘Project language level’. I forgot to do that when creating the GIF.
Project Structure > Project > Project language level
For Java 8 set it to 8, for Java 9 set it to 9, and so on.
answered Mar 5, 2018 at 7:55
Gayan WeerakuttiGayan Weerakutti
11.1k1 gold badge67 silver badges66 bronze badges
- I am using IntelliJ IDEA 14.0.3, and I also have same question. Choose menu
FileOther SettingsDefault Project Structure...
- Choose
Projecttab, sectionProject language level, choose level from dropdown list, this setting isdefault for all new project.
answered Feb 14, 2015 at 15:36
I have found out that in recent versions of IntelliJ IDEA requires Java 1.8 but is not configured by default.
We can change the path or configure from Project Settings > Project > Project SDK
here we can edit or add the JDK´s path.
(in my case the path is located in C:Program FilesJavajdk1.8.0_102)
answered Feb 1, 2017 at 17:49
JorgesysJorgesys
123k23 gold badges328 silver badges264 bronze badges
Change JDK version to 1.8
- Language level File -> project Structure -> Modules -> Sources -> Language level -> 8-Lambdas, type annotations etc.
-
Project SDk File -> project Structure -> Project 1.8
-
Java compiler File -> Settings -> Build, Executions, Deployment -> Compiler -> Java compiler
answered May 3, 2016 at 7:47
ethemsulanethemsulan
2,20126 silver badges19 bronze badges
1
One other place worth checking: Look in the pom.xml for your project, if you are using Maven compiler plugin, at the source/target config and make sure it is the desired version of Java. I found that I had 1.7 in the following; I changed it to 1.8 and then everything compiled correctly in IntelliJ.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
Rich
15.5k15 gold badges77 silver badges125 bronze badges
answered Apr 3, 2017 at 21:45
barclaybarclay
4,3329 gold badges49 silver badges67 bronze badges
The above responses were very useful, but after all settings, the project was running with the wrong version. Finally, I noticed that it can be also configured in the Dependencies window.
Idea 2018.1.3 File -> Project Structure -> Modules -> Sources and Dependencies.
answered May 19, 2018 at 10:00
knollmajknollmaj
511 silver badge2 bronze badges
To change the JDK version of the Intellij-IDE himself:
Start the IDE -> Help -> Find Action
than type:
Switch Boot JDK
or (depend on your version)
Switch IDE boot JDK
answered Aug 9, 2019 at 8:30
JavaJava
2,3391 gold badge10 silver badges22 bronze badges
3
For latest version intellij, to set default jdk/sdk for new projects go to
Configure->Structure for New Projects -> Project Settings -> Project SDK
answered Apr 17, 2020 at 15:42
MrKulliMrKulli
72510 silver badges18 bronze badges
2
I am using IntelliJ 2020.3.1 and the File > Other Settings… menu option has disappeared. I went to Settings in the usual way and searched for «jdk». Under Build, Execution, Deployment > Build Tools > Maven > Importing I found the the setting that will solve my specific issue:
JDK for importer.
answered Jan 27, 2021 at 14:24
cptullycptully
5036 silver badges24 bronze badges
On my linux machine I use a script like this:
export IDEA_JDK=/opt/jdk14
/idea-IC/bin/idea.sh
answered Jul 22, 2020 at 15:03
Marinos AnMarinos An
8,8115 gold badges54 silver badges92 bronze badges











