Moandji Ezana Blog

Eclipse is as confusing as ever. And the splash screens aren’t getting any better…

Kepler splash screenLuna splash screen

With the official release of Java 8, Eclipse announced support for Java 8 in Kepler and Luna. In reality, that support is not provided out-of-the-box, especially if you want to use Maven.

Kepler

In Eclipse Kepler SR2 (4.3.2) (the SR2 part is important), you need to get a JDT patch from the 4.3 update site. There are instuctions in the announcement. Then, add an Installed JRE and an execution environment:

  1. Window > Preferences > Java > Installed JREs
  2. Add…
  3. Choose JDK 8’s home directory
  4. Click OK and go to Window > Preferences > Java > Installed JREs > Execution Environment (you have to close the preferences pane because the list of execution environments isn’t updated when you add the Java 8 JDK)
  5. Select JavaSE-1.8 and check jdk1.8.0

Luna

I initially downloaded Luna Milestone 6 and was surprised not to see Java 8 support. By reading the announcement very carefully, it turns out that the earliest Luna build with Java 8 support is from March 18, 2014 and Milestone 6 was released on March 6. So, you can either:

  1. download the latest 4.4 milestone (4.4M6 at the time of writing) and add the integration builds update site, or
  2. download I20140325-0830.

In both cases, choose a download from the “Eclipse SDK” section. I took the first option, because of all the big red X’s in the Status column of the integration build.

Luna is still rough. It seems to work, but there are a lot of weird, dev-related items in menus.

Maven

When using Maven your work is still not done: setting the maven-compiler-plugin to 1.8 will cause Eclipse to set the project’s compiler level to 1.4.

You need the latest from the m2e 1.5 milestones update site.

And there you have it: Java 8 and Maven in Eclipse, in 657 easy steps!