How to force Eclipse m2e plugin to use jdk for a project

前端 未结 2 393
野的像风
野的像风 2020-12-31 23:21

I\'m using Maven with \'Eclipse Kepler JavaEE\'. I have something like this in \'maven-compiler-plugin\' :


    1.7

        
相关标签:
2条回答
  • 2021-01-01 00:01

    In Eclipse, open Window | Preferences | Java | Installed JREs, make sure there's a JDK (and not just a JRE) for Java 1.7, then go to the submenu Execution Environments and mark this JDK as compatible with JavaSE-1.7.

    After that, Maven | Update Project should work as desired.

    0 讨论(0)
  • 2021-01-01 00:01

    First MVN_HOME has to be setup and then the JDK as to browsed instead of JRE

    Window--> Preferences--> Java-->Installed JREs
    

    and select JDK (e.g. : jdk1.7 or jdk1.8)

    the do mvn install it will work

    0 讨论(0)
提交回复
热议问题