Eclipse JRE System Library [J2SE-1.5]

前端 未结 3 839
别那么骄傲
别那么骄傲 2020-12-12 21:01

I\'m using Eclipse EE 3.7 with m2e plugin installed. I have JDK7 set in eclipse. When I import maven projects, the JRE is set to JRE System Library [J2SE-1.5],

3条回答
  •  生来不讨喜
    2020-12-12 21:21

    The problem is not with Eclipse, but with the projects you're importing. m2e will set the project's JRE to match the maven project. The POM specifies the JRE version, and this is defaulted to 1.5 if not present. You need this in the POM:

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

提交回复
热议问题