Skip to content
Advertisement

How do I change the IntelliJ IDEA default JDK?

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?

Advertisement

Answer

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…”

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement