How do I change language level for all modules in IntelliJ

前端 未结 3 1284
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 02:11

I have a project with MANY modules. We\'re upgrading to Java7, and I want my editor to reflect this. Now all my modules specifically set the language level to Java6, and there a

3条回答
  •  攒了一身酷
    2021-02-05 02:40

    The other solutions didn't worked for me, even after modifying by hand the compiler.xmland all the .iml files the the LANGUAGE_LEVEL was still set to "JDK_1_5". This was caused by the maven-compiler-plugin plugin's configuration option.

    Changing it to the following fixed it:

    
    
        
            org.apache.maven.plugins
            maven-compiler-plugin
            3.5.1
            
                1.8
                1.8
            
        
    
    

    Hope this solves it for others also.

提交回复
热议问题