问题
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??
回答1:
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.
回答2:
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
回答3:
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
来源:https://stackoverflow.com/questions/46453241/choosing-jre-runtime-environment-in-java-9-in-eclipse-oxygen-version