Maven “build path specifies execution environment J2SE-1.5”, even though I changed it to 1.7

后端 未结 11 1560
天涯浪人
天涯浪人 2020-11-27 12:00

In Eclipse Juno, I installed the latest m2e plugin (1.2.20120903-1050). In preferences, I have added jdk1.7.0_11 in Java -> Installed JREs -> Add, and then specified the lo

11条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 12:35

    If you are getting following type of error

    Then do the following steps-->>

    • Go to Windows. Then select Preferences, in Which select java(on the left corner).
    • In java select Installed JREs and check your JRE(if you have correctly installed jdk and defined environment variables correct then you will see the current version of the installed java here)as shown -

    (I have Java 8 installed) Check the check box if it is not checked. Click apply and close.

    Now Press Alt+Enter to go into project properties,or go via right clicking on project and select Properties.

    In Properties select Java Build Path on left corner

    Select Libraries

    And click edit(after selecting The JRE System Library...) In edit Click and select Workspace default JRE. Then click Finish

    In Order and Export Check the JRE System Library.

    Then Finally Apply and close Clean the project and then build it.

    Problem Solved..Cheers!!

提交回复
热议问题