Eclipse JRE System Library [J2SE-1.5]

前端 未结 3 838
别那么骄傲
别那么骄傲 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:23

    The root cause of this issue is Eclipse cannot resolve a valid value for the maven.compiler.source property when updating the .classpath file from the pom, it is simply using default one i.e

    org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5.
    

    Just Add following properties into you pom.xml and update project:

    
                1.8
                ${java.version}
                ${java.version}
    
    

提交回复
热议问题