Configuring JRE 1.8 in Eclipse

Following-up on Installing the Eclipse Kepler Java 8 Patch, I thought I’d post a few screenpics on configuring the Java 8 JRE. First check out a project using JRE 1.8. Looks good, doesn’t it?

If you’ve installed the Oracle 8 JDK and JRE, and applied the Eclipse Kepler Java 8 Patch, Eclipse will know about the existence of the JRE 1.8, but that’s about it. No problem configuring it though, as we’ll see.

In Eclipse Preferences -> Compiler, compliance will be at 1.7 until we change it.

We’ll be installing the Java 8 JRE to get started.

We “Add” a Standard VM.

Point to our install of the Java 8 JRE and Eclipse takes care of the rest.

Returning to our installed JREs we find JRE 1.8. Yes!

The only thing remaining is to set projects and objects like Ant build files to use JRE 1.8. We removed the JRE 1.7 from this project and added the Java 8 JRE, for instance.

Bonus Action Shots

As a bonus here are a couple of Eclipse Action Screenshots using Java 8 features. Here is the Intellisense displayed when constructing a Lambda Expression.

And the final Lambda which replaces the for/if() Java 7 logic shown beneath it, now commented out.