Add Java 8 support to Eclipse Kepler

Edit: I recommend that you just update to the Luna release. While we’re pretty sure that this still works, it’s not a configuration that we test anymore.

Want to add Java 8 support to Kepler?

Java 8 has not yet landed in our standard download packages. But you can add it to your existing Eclipse Kepler package. I’ve got three different Eclipse installations running Java 8:

  • A brand new Kepler SR2 installation of the Eclipse IDE for Java Developers;
  • A slightly used Kepler SR1 installation of the Eclipse for RCP/RAP Developers (with lots of other features already added); and
  • A nightly build (dated March 24/2014) of Eclipse 4.4 SDK.

The JDT team recommends that you start from Kepler SR2, the second and final service release for Kepler (but using the exact same steps, I’ve installed it into Kepler SR1 and SR2 packages). There are some detailed instructions for adding Java 8 support by installing a feature patch in the Eclipsepedia wiki.

The short version is this:

  • From Kepler SR2, use the “Help > Install New Software…” menu option to open the “Available Software” dialog;
  • Enter into the “Work with” field (highlighted below);
  • Put a checkbox next to “Eclipse Java 8 Support (for Kepler SR2)” (highlighted below);
  • Click “Next”, click “Next”, read and accept the license, and click “Finish”
  • Watch the pretty progress bar move relatively quickly across the bottom of the window; and
  • Restart Eclipse when prompted.
Select "Help > Install New Software..." to open the Available Software dialog.

Select “Help > Install New Software…” to open the Available Software dialog.

Voila! Support for Java 8 is installed.

If you’ve already got the Java 8 JDK installed and the corresponding JRE is the default on your system, you’re done.

If you’re not quite ready to make the leap to a Java 8 JRE, there’s still hope (my system is still configured with Java 7 as the default).

    • Install the Java 8 JDK;
    • Open the Eclipse preferences, and navigate to “Java > Installed JREs”;
Java Runtime Environment Preferences

Java Runtime Environment Preferences

    • Click “Add…”;
    • Select “Standard VM”, click “Next”;
    • Enter the path to the Java 8 JRE (note that this varies depending on platform, and how you obtain and install the bits);
Java 8 JRE Definition

Java 8 JRE Definition

  • Click “Finish”.

Before closing the preferences window, you can set your workspace preference to use the newly-installed Java 8 JRE. Or, if you’re just planning to experiment with Java 8 for a while, you can configure this on a project-by-project basis.

Specify that your project will use a JavaSE-1.8 JRE.

In the Create a Java Project dialog, specify that your project will use a JavaSE-1.8 JRE.

It’s probably better to do this on the project as this will become a project setting that will follow the project into your version control system.

Next step… learn how wrong my initial impressions of Java 8 were (hint: it’s far better).

The lamda support is so choice. If you have the means, I highly recommend picking one up.

The lambda is so choice. If you have the means, I highly recommend picking one up.

This entry was posted in Eclipse 101, Eclipse 4, Java. Bookmark the permalink.

20 Responses to Add Java 8 support to Eclipse Kepler

  1. Fabulous says:

    Does it include refactorings and templates?

  2. Max says:

    A hint for string concatenation. Try this, if you haven’t found it so far:“, “))
    Or use another overloaded version of the joining method. Very convenient 🙂

  3. There is a mistake in the address here.
    please every one look here, and you will find the right path to Java 8 support

    • waynebeaton says:

      The link in my post is correct. It’s not a browsable link, however, it needs to be copied and pasted into the “Available Software” dialog. Clicking the link just gives you a 404 (we have several bugs open to address this).

      Another alternative is to search for “Java 8” in the Eclipse Marketplace (Help > Eclipse Marketplace) and install from there.

      • robertkuhar says:

        Neither of these work. I end up at “Install remediation page”, “Eclipse JDT (Java Development Tools) Patch with Java 8 support (for Kepler SR2)” is not applicable to the current configuration and will not be installed.

        The marketplace install fails in exactly the same manner.


      • waynebeaton says:

        Remediation means that you have something in your installation that’s conflicting. Something may, for example, have a dependency on a very specific version of the JDT.

  4. Any idea which is the path to the Java 8 JRE in Mac OS X Mavericks ? Thanks for any help

  5. robertkuhar says:

    This doesn’t seem to work on Eclipse 4.3.2 on OSX. I suspect its, somehow, fighting with the Groovy plug-in. When I download the Eclipse 4.3.2 build with the Java8 support installed: . I am no longer able to install the groovy plug-in. My “day job” is all Java and Groovy. It looks like Java 8 may have to wait. Who’s bug is this and how do I get it addressed?

    • waynebeaton says:

      My best guess is that the Groovy plug-in has a dependency on a very specific version of the JDT. I would start there. Which Groovy plug-in do you have installed? i.e. what p2 repository did you install from?

      • robertkuhar says:

        The update site for the groovy plug in is:

        The groovy plug-in itself has worked really well for me across 3 separate eclipse versions now (maybe 4); Helios to Indigo, Indigo to Juno, and now Juno to Kepler. I’ve only been on Kepler for maybe 1 month. Prior to that Juno may have been for over 1 year.

        Does this excerpt from “Configuration” help?
        *** Features:
        org.codehaus.groovy.eclipse.feature (2.8.0.xx-20130703-1600-e43-RELEASE) “Groovy-Eclipse plugin”
        org.codehaus.groovy.jdt.patch (2.8.0.xx-20130703-1600-e43-RELEASE) “Groovy-Eclipse plugin”
        org.codehaus.groovy.m2eclipse (2.8.0.xx-20130703-1600-e43-RELEASE) “Groovy-Eclipse m2eclipse integration”
        org.codehaus.groovy18.feature (2.8.0.xx-20130703-1600-e43-RELEASE) “Groovy-Eclipse plugin”
        org.codehaus.groovy20.feature (2.8.0.xx-20130703-1600-e43-RELEASE) “Groovy-Eclipse plugin”
        org.codehaus.groovy21.feature (2.8.0.xx-20130703-1600-e43-RELEASE) “Groovy-Eclipse plugin”

  6. Indeed, it was the groovy-eclipse plugin.

  7. I don’t have groovy-eclipse. Uninstalled basically everything and now am left to uninstall

    AspectJ Compiler REMOVED
    AspectJ Development tool REMOVED
    Cross reference tool (XRef) REMOVED
    Eclipse IDE for Java EE Developers
    Eclipse Weaving Service – REMOVED
    Maven integration for AJDT – REMOVED
    Maven integration for AJDT – REMOVED
    m2e – REMOVED

    Nice to get some hints on *what* is actually incompatible. I’ll probably end up with this message “There is nothing left to uninstall. Would you like to completely uninstall Eclipse? It won’t help but it might make the transition to Luna easier.” 😦

    So, for future reference. I managed to install after removing the AspectJ development tool. The last one I removed, of course. Who knows which ones were culprits

  8. BTW still don’t see 1.8 as a selectable compiler lever after finally getting it installed

  9. I use keppler for Java EE. I install new software as your suggestion above. But after that, I cannot export my web project to war. Also I then realize on my File->New it only show “”. I am currently updating the IDE from Help->Check For Updates.

    • waynebeaton says:

      That’s a bit odd as I’m pretty sure the functionality is not related.

      Rather than follow these instructions, it would be better to just update to the Luna release. I’ll update the post to reflect this.

  10. Thank you !!! This worked.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s