With java 9 ea, Eclipse fails to install and show

2019-01-20 04:31发布

问题:

I know this problem occurs many time, but I have find a similar situation like I have.

Every time I click the Eclipse Installer, I will get a prompt:An error has occurred, see the log file null. I can't even install Eclipse.

I guess the problem is due to "JDK 9-ea", so I am planing to uninstall jdk 9-ea and use jdk8, but maybe you can help me to solve this problem directly, thanks !

回答1:

First, you need to get the correct install most probably, here is the Oxygen 4.7 M6 link : http://download.eclipse.org/eclipse/downloads/drops4/S-4.7M6-201703082000/

Or the direct link to the .tar.gz

Then (after you untar the archive), go to :

Eclipse.app/Contents/Eclipse/eclipse.ini

and add one parameter after -vmargs. It should look like this:

-vmargs
--add-modules=java.se.ee

This will allow you to start the Eclipse under jdk-9.

In case you want to install the jdk-9 plugin (so that you could compile code under jdk-9): you need to install the Experimental Plugin for jdk-9. There were some problems with that (I filed a bug that was closed), see this thread. At the end there is the link for on how to get the plugin.

Then you need to follow the exact instructions here for it to actually work.



回答2:

Simply adding this line to the eclipse.ini "--add-modules=java.se.ee" will resolve the whole issue

mine is macOs and Java 9 installed alone without any other version

Hope this helps