简体   繁体   中英

Choosing JRE runtime environment in java 9 in eclipse oxygen version

I am trying to explore Java 9 features with Eclipse Oxygen Version. I have downloaded the java 9 and Eclipse Oxygen version.

But when I try to create a new java project Java SE 1.9 is not available in the list of JRE Execution environment.

How to proceed further? Any help would be appreciated.

Choosing Runtime environment在此处输入图片说明

Choosing default JRE?? 在此处输入图片说明

Eclipse Oxygen (4.7.0) does not support Java 9. You can install a patch to add support from Eclipse market place see here

Eclipse Oxygen.1a (4.7.1a) is scheduled to be released on 11th October (2017) with full Java 9 support.

More details in the Eclipse wiki here

How to proceed further? Any help would be appreciated.

Try to make use of the option Use default JRE . Though this seems to be not configured on your machine currently. ("Unknown")

You can try out the Java9 example and take a look at Greg's answer on how to support it with the current Eclipse version.

Note : For the patch to work with you would have to install java-9-support-beta-oxygen as well.

After you have installed the Java 9 support for Eclipse Oxygen through the Marketplace you also have to edit your eclipse.ini. Eclipse has to be started through the Java 9 JDK, so add/change existing to:

-vm
C:\Program Files\Java\jdk-9\bin\javaw.exe

You will also need an additional vmargs argument:

--add-modules=ALL-SYSTEM

After this you should be able to select a Java 9 JDK and it will be detected as such.

See eclipse wiki for detailed informations: https://wiki.eclipse.org/Configure_Eclipse_for_Java_9

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM