Config Java 8 support in eclipse Kepler & run java 8 Hello World program

Eclipse Luna (4.4) supports java 8 by default. But if you are using eclipse version kepler SR2, then you need to install “Eclipse Java Development Tools Patch with Java 8 support (for Kepler SR2)” to support java 8

By default, even if you have added Java 1.8 using Window->Preferences->Java->Installed JRE, you won’t find java 8 in eclipse JDK compliance.java8 add

java8 not found

The above patch for Kepler SR2, implements JDT that supports Java 8. Let us see how to install the patch..

Assume that you have previously installed the following:
Java SE Development Kit 8,
One of the Eclipse Kepler SR2 packages

Open Eclipse and use the Eclipse Marketplace to add Java™ 8 support to your Eclipse Kepler SR-2 package:

Step 1: Select Help -> Eclipse Marketplace as shown in the below picture.

step1
Step 2: Enter “Java 8 Kepler” in the find box and click on GO

eclipse java 8 support
Step 3: Click on Install button on Java 8 support for Eclipse Kepler SR2. Then Finish. If you have already installed, then you can update or uninstall.

Now Check the installation of Eclipse JDT Patch with Java 8 support (for Kepler SR2) using the below steps.

Help -> About Eclipse -> Installation Details checkout java8 support in eclipse
OR
Window->Preferences->Java->Installed JRE, you will find java 8 in eclipse JDK compliance

eclipse java 8 support 2
Now your eclipse is ready to run java 8 programs.

Set Compiler Compliance Level to java 8 and run the below java 8 hello world program and enjoy..

}

Reference : http://www.eclipse.org/downloads/java8/

Leave a Reply

Be the First to Comment!