Eclipse + Java 8 support?

前端 未结 7 1817
广开言路
广开言路 2020-11-29 06:04

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

相关标签:
7条回答
  • 2020-11-29 06:13

    As written in https://wiki.eclipse.org/JDT_Core/Java8 :

    "Starting with I20140318-0830 all our Luna (4.4) builds contain the Eclipse support for Java™ 8. For Kepler SR2 (4.3.2) a feature patch is available. "

    enter image description here

    So right now you need to download a non stable eclipse release.

    Go to : http://download.eclipse.org/eclipse/downloads/

    There download a release older than or equals to I20140318-0830

    enter image description here

    Then you choose your version according to your OS :

    enter image description here

    click on the (http) link, the download will start :

    enter image description here

    Note that according to eclipse website : Java™ 8 has not yet landed in our standard download packages. But you can add it to your existing Eclipse Kepler SR2 package. It will be included in the Luna packages starting with M7 on May 9/2014.

    so after May 9/2014 getting eclipse working with java 8 will be simpler.

    0 讨论(0)
  • 2020-11-29 06:14

    For Eclipse Mars.1 Release (4.5.1) you have to download extra package with jre-8u73-windows-x64.tar.gz to your java8/jre folder and point it in -VM section in eclipse.ini. It works for me.

    0 讨论(0)
  • 2020-11-29 06:17

    Now that Java 8 has shipped, Eclipse has released support for it. Java 8 is available as an 'update' for Eclipse Kepler (Eclipse 2013 release) and is available in integration / nightly builds towards Eclipse Luna (Eclipse 2014 release). For more information about enhancements and how to install it in your current version of the IDE, see http://eclipsesource.com/blogs/2014/03/25/eclipse-support-for-java-8/

    0 讨论(0)
  • 2020-11-29 06:19

    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

    0 讨论(0)
  • 2020-11-29 06:23

    It appears that this is still very much a work in progress (hence, there will be stability issues). Is there a particular reason you want to use Java 8?

    This explains what you should be doing:

    • Checkout the BETA_JAVA8 branch of the following git repositories: JDT/Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
    • You need to install a JDK8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
    • For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
    • As API Baseline, use 3.8 (or 3.8 RC4 until 3.8 is released).

    I have not downloaded this repo, but I would assume it contains the eclipse jdt core (as the name states). I would just wait until a stable release is finished.

    0 讨论(0)
  • 2020-11-29 06:27

    Link to the Eclipse Java 8 support Update site https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler

    0 讨论(0)
提交回复
热议问题