Project language level always set to 6 when creating a new project

Answered

Every time I create a new project in IntelliJ, the project language level is always set to 6 by default.  Even though I specify the bytecode level to be 11, it is always set to 6 by default.  I've researched this problem online and it seems to be a bug when creating projects from a template.  I'm not sure why this bug has not been fixed yet after several months.

 

0
7 comments

Hello,

You could configure it under "File | Other Settings | Structure for new Projects"

 

1

It doesn't work for maven projects, even using "File | Other Settings | Preferences for new Projects".

Despite I have JDK 8 as the default SDK in IntelliJ IDEA, it creates new maven projects with Java 5 language level.

0
Avatar
Liubov Melnikova

Please create a support ticket (right upper corner) with attached screenshot of settings and idea.log (Help | Show Log in ...).

0

Thanks for the link Serge, but that just shows how to change the language level for some existing project. The issue is that even configuring IntelliJ IDEA to create new projects with a specific Java version, it doesn't work for maven projects (only for regular projects).

Liubov, I'll create the ticket. Thanks.

0

It's by design since in Maven projects you have to adjust the levels in pom.xml file manually. IntelliJ IDEA doesn't modify pom.xml files for you, it can only import from pom.xml. In other words, the synchronization is one way.

0

In fact, it doesn't work even if I set the language level in the pom's property tag by adding <maven.compiler.source>1.8</maven.compiler.source> or using the maven-compiler-plugin.

Anyway, I reported the issue here: https://youtrack.jetbrains.com/issue/IDEA-212236.

Thanks.

0

Please sign in to leave a comment.