Eclipse + Java 8 support?

mmm picture mmm · Feb 22, 2013 · Viewed 44.2k times · Source

How can I get Java 8 to work with Eclipse?

I have followed this guide but doesn't work. I've also seen the Eclipse Java 8 wiki page, but they don't explain what to do with the checked out git repositories.

Answer

Hari Gudigundla picture Hari Gudigundla · Apr 6, 2014

For Kepler SR2 (4.3.2) a feature patch needs to be installed in order to get JAVA 8 support. Follow these steps:

  • Eclipse - Help (MENU) > Install New Software...

  • enter the following URL into the 'Work with' field:
    http://download.eclipse.org/eclipse/updates/4.3-P-builds/

  • press 'Enter'

  • select category 'Eclipse Java 8 Support (for Kepler SR2)'
  • click 'Next'
  • click 'Next'
  • accept the license
  • click 'Finish'

  • restart Eclipse when asked

source: link

@Elisabeth

In order to have the desired JRE/ JDK on BuildPath, follow these steps.

  • Right click on Project from Package Explorer
  • Select BuildPath and then select Configure Builpath
  • Select Libraries Tab from the popped up Properties window
  • Select the current JRE System Library
  • Click Remove button
  • Click on Add Library button
  • Select JRE System Library
  • There you will be able to add your desired JRE/ JDK version using 3 different methods.

If you don't find your desired version of JRE/ JDK there in those 3 options, then you will have to install that first. The following link helps you in detail with screen shots to do the same. Hope it helps.

source: link