diff options
author | Markus Keller | 2015-05-11 15:39:02 +0000 |
---|---|---|
committer | Markus Keller | 2015-05-11 15:40:15 +0000 |
commit | 5bc6a5ead11618196a0cc834eb1726c6060387d6 (patch) | |
tree | c75cb6d3485544dccd06aaa328e5af985006a3b3 | |
parent | fd8fcff33cd81ca46943d4ee37b154e03f5f98d7 (diff) | |
download | rt.equinox.framework-5bc6a5ead11618196a0cc834eb1726c6060387d6.tar.gz rt.equinox.framework-5bc6a5ead11618196a0cc834eb1726c6060387d6.tar.xz rt.equinox.framework-5bc6a5ead11618196a0cc834eb1726c6060387d6.zip |
Bug 466683: Java 9 b61+: Eclipse 4.x does not start because org.w3c.dom.** has been moved to extension classpathI20150512-2100I20150512-2000I20150511-2130I20150511-2000
Change-Id: I3fb88d97cf633ef4ea7319cb7eafb0ceb6a7d03b
Signed-off-by: Markus Keller <markus_keller@ch.ibm.com>
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java index 76f172202..c4bac8e1d 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java @@ -636,7 +636,23 @@ public class Main { } private void invokeFramework(String[] passThruArgs, URL[] bootPath) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, Error, Exception, InvocationTargetException { - String type = System.getProperty(PROP_FRAMEWORK_PARENT_CLASSLOADER, System.getProperty(PROP_PARENT_CLASSLOADER, PARENT_CLASSLOADER_BOOT)); + String type = PARENT_CLASSLOADER_BOOT; + try { + String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$ + if (javaVersion != null && new Identifier(javaVersion).isGreaterEqualTo(new Identifier("1.9"))) { //$NON-NLS-1$ + // Workaround for bug 466683. Some org.w3c.dom.* packages that used to be available from + // JavaSE's boot classpath are only available from the extension path in Java 9 b62. + type = PARENT_CLASSLOADER_EXT; + } + } catch (SecurityException e) { + // If the security manager won't allow us to get the system property, continue for + // now and let things fail later on their own if necessary. + } catch (NumberFormatException e) { + // If the version string was in a format that we don't understand, continue and + // let things fail later on their own if necessary. + } + type = System.getProperty(PROP_PARENT_CLASSLOADER, type); + type = System.getProperty(PROP_FRAMEWORK_PARENT_CLASSLOADER, type); ClassLoader parent = null; if (PARENT_CLASSLOADER_APP.equalsIgnoreCase(type)) parent = ClassLoader.getSystemClassLoader(); |