The development of Eclipse support for Java 8 is ongoing in a branch (http://wiki.eclipse.org/JDT_Core/Java8).
To try out the current Eclipse support for Java 8, I did the following:
BETA_JAVA8
of git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
.To use the new syntax available in Java 8, Eclipse said that I have to set the compliance level of my code to 1.8. To set the compliance level, I have to set the execution environment to JavaSE-1.8
. This execution environment was not available at Windows -> Preferences -> Java -> Installed JREs -> Execution Environments
.
How can I set the execution environment to JavaSE-1.8
?
The following summarizes some of my attempts to install the execution environment:
JavaSE-1.8
at the update site http://download.eclipse.org/eclipse/updates/4.2. But, the definition of the execution environment wasn't there.JavaSE-1.8
profile in the git repository of rt.equinox.framework, but, it wasn't there.I just went to the Eclipse Marketplace from inside of Eclipse (Help/Eclipse Marketplace...) and installed the "Java 8 support for Eclipse Kepler SR2", and the new "JavaSE-1.8" execution environment showed up automatically. I had previously installed Java 8 and added it as a 'Installed JREs' entry. No need to mess with property files.