From 91137155f1734258aaeb27aea7c557dd95fd65de Mon Sep 17 00:00:00 2001 From: Markus Keller Date: Fri, 18 Mar 2016 17:38:35 +0100 Subject: Bug 489958: Java9 9-ea+108: Eclipse doesn't start because javax.annotation.* types are not on boot classpath java.version is now "9-ea". This commit adapts the workaround for bug 466683 to JEP 223. Change-Id: I96165e5935aa96cbc8ec6f894a476c58befbcf3f Signed-off-by: Markus Keller --- .../src/org/eclipse/equinox/launcher/Main.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 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 00143d4e9..66dd88d54 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 @@ -259,7 +259,8 @@ public class Main { /** * A structured form for a version identifier. * - * @see "http://java.sun.com/j2se/versioning_naming.html for information on valid version strings" + * @see "http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html for information on valid version strings" + * @see "http://openjdk.java.net/jeps/223 for information on the JavaSE-9 version JEP 223" */ static class Identifier { private static final String DELIM = ". _-"; //$NON-NLS-1$ @@ -283,16 +284,16 @@ public class Main { if (tokenizer.hasMoreTokens()) major = Integer.parseInt(tokenizer.nextToken()); - // minor - if (tokenizer.hasMoreTokens()) - minor = Integer.parseInt(tokenizer.nextToken()); - try { + // minor + if (tokenizer.hasMoreTokens()) + minor = Integer.parseInt(tokenizer.nextToken()); + // service if (tokenizer.hasMoreTokens()) service = Integer.parseInt(tokenizer.nextToken()); } catch (NumberFormatException nfe) { - // ignore the service qualifier in that case and default to 0 + // ignore the minor and service qualifiers in that case and default to 0 // this will allow us to tolerate other non-conventional version numbers } } @@ -643,6 +644,8 @@ public class Main { 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. + // Workaround for bug 489958. javax.annotation.* types are only available from + // JavaSE-9's extension path in Java 9-ea+108. The identifier "1.9" could be changed to "9", but "1.9" works just as well. type = PARENT_CLASSLOADER_EXT; } } catch (SecurityException e) { -- cgit v1.2.3