How do I add execution environment 1.8 to Eclipse Luna?

66,684

Solution 1

Open Preferences and look in 'Java > Installed JREs'. If you don't have a Java 8 shown there click 'Add...' to add it. Close the preferences.

Open Preferences again and look in 'Java > Installed JREs > Execution Environments', select 'JavaSE-1.8' and make sure your Java 1.8 is checked as the Compatible JRE

Solution 2

If the eclipse version is old as @mike stated in his answer then you would be unable to view the JavaSE-1.8 on the Execution Environments list in your eclipse; You can do the following to use it even on older versions:

Or just download and use the latest eclipse

Share:
66,684
geoxile
Author by

geoxile

Updated on July 09, 2022

Comments

  • geoxile
    geoxile almost 2 years

    I have jre8 installed and set as the default for the jre but under compiler compliance I can't find 1.8 and under execution environment I can't find javaSE 1.8. I'm using the latest build of Eclipse EE.

    I took a look at this manual http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-add_new_jre.htm But I couldn't find any .ee files in my jre8 or JDK1.8 installation directories.

  • Theodore Murdock
    Theodore Murdock about 8 years
    +1 The "close the preferences" step seems a bit odd, since one would hope that pressing "apply" would be enough, but it is apparently necessary as of Luna.
  • Abhishek Sharma
    Abhishek Sharma about 7 years
    I tried so many solutions over internet. Finally found the answer i was looking for. Thanks!
  • greg-449
    greg-449 almost 7 years
    @MikeRoger The location of Preferences varies depending on the platform - on macOS it in the 'application' menu not Windows.
  • MikeRoger
    MikeRoger almost 7 years
    On Windows, "Preferences" under the "Window" top menu. Thanks @greg-449 for macOS info.