简体   繁体   中英

How do I add execution environment 1.8 to Eclipse Luna?

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.

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

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

Older versions of Eclipse might not work with javaSE-1.8

You need to find out what version of Eclipse you have by going into its help menu and clicking on About Eclipse.

If your version is older than the one at https://www.eclipse.org/downloads/ then you need to uninstall your older version and install the latest version.

I had the same problem with my Eclipse on Linux Mint. And the only way I could solve it was by following above instructions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM