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?


This setting is changed in the "Default Project Structure..." dialog. Navigate to "File" -> "Other Settings" -> "Default Project Structure...".

选择默认项目结构

Next, modify the "Project language level" setting to your desired language level.

设置项目语言级别

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


  • I am using IntelliJ IDEA 14.0.3, and I also have same question. Choose menu File Other Settings Default Project Structure...
  • 在这里输入图像描述

  • Choose Project tab, section Project language level , choose level from dropdown list, this setting is default for all new project .

    在这里输入图像描述

  • 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 )

    在这里输入图像描述

    在这里输入图像描述

    链接地址: http://www.djcxy.com/p/96584.html

    上一篇: IntelliJ 14 + Lombok插件+ @Builder =错误

    下一篇: 如何更改IntelliJ IDEA默认JDK?