use -source 7 or higher

后端 未结 7 1446
既然无缘
既然无缘 2020-12-28 12:15

While trying to build a project using intelliJ Ultimate 12 I am getting these errors

use -source or higher to enable diamond operator
use -source 7 or higher         


        
7条回答
  •  一整个雨季
    2020-12-28 13:07

    None of the above worked for me.

    I had to explicitly add the following plugin statement to my pom.xml:

      
        org.apache.maven.plugins
        maven-compiler-plugin
        
          1.7
          1.7
        
      
    

    (Well, IDEA made it for me when I clicked the red help lamp and selected "Set project Java level to 7", so maybe try that if this also doesn't work).

提交回复
热议问题