With some further discussion on jdk9-dev: the problems when using the app class loader seem to come from the situation that part of the org.w3c class files come from the javax.xml bundle.
So, I did a small experiment: remove all .class files from the javax.xml bundle, but leave the exports information. My assumption here was that that should then "export" the JDK classes.
That didn\'t quite work: eclipse failed to start because org.w3c.dom.css was unavailable. Adding those classes to the bundle however worked to the effect that Eclipse starts up and seems to be usable.
So, workaround instructions:
$ cd /some/tmp/directory
$ jar xf $ECLIPSE_HOME/plugins/javax.xml_1.3.4.v201005080400.jar
$ rm $ECLIPSE_HOME/plugins/javax.xml_1.3.4.v201005080400.jar
$ jar cvmf whereever/you/downloaded/to/MANIFEST.MF-trimmed $ECLIPSE_HOME/plugins/javax.xml_1.3.4.v201005080400.jar about* license/ org/apache/ plugin.properties org/w3c/dom/css
$ # modify $ECLIPSE_HOME/eclipse.ini and add -Dorg.osgi.framework.bundle.parent=app
而此时的我一脸懵逼。
接下来呀,我换了个1.8.0的Java(较低版本),以前是10.0.1。Eclispe是成功打开了。可惜当弹出提示Java有更新时,我执行会出现如下应用程序错误。
点详细信息如下:
代码复制出来是这个样子:
java.lang.IllegalArgumentException: Invalid characters in hostname
at java.net.HostPortrange.toLowerCase(Unknown Source)
at java.net.HostPortrange.<init>(Unknown Source)
at java.net.URLPermission$Authority.<init>(Unknown Source)
at java.net.URLPermission.parseURI(Unknown Source)
at java.net.URLPermission.init(Unknown Source)
at java.net.URLPermission.<init>(Unknown Source)
at sun.net.(Unknown Source)
at sun.net.(Unknown Source)
at sun.net.(Unknown Source)
at java.net.URLConnection.getContentType(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.retrieveContentOfPACFile(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.contructLegacyPACScript_16(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source)
at com.sun.deploy.net.proxy.SunAutoProxyHandler.init(Unknown Source)
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
at com.sun.javaws.Main.initializeExecutionEnvironment(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
而且当我导入以前的Java工程文件后,运行程序时出现如下错误: