Bug 162833 - Java WebStart support is broken with J2SE 6.0
diff --git a/platform/org.eclipse.platform/src/org/eclipse/core/launcher/Main.java b/platform/org.eclipse.platform/src/org/eclipse/core/launcher/Main.java
index 13817ec..6fce531 100644
--- a/platform/org.eclipse.platform/src/org/eclipse/core/launcher/Main.java
+++ b/platform/org.eclipse.platform/src/org/eclipse/core/launcher/Main.java
@@ -355,7 +355,7 @@
*
* @return a boolean indicating whether the checking passed
*/
- private boolean checkVersion(String availableVersion, String requiredVersion) {
+ protected boolean checkVersion(String availableVersion, String requiredVersion) {
if (requiredVersion == null || availableVersion == null)
return true;
try {
diff --git a/platform/org.eclipse.platform/src/org/eclipse/core/launcher/WebStartMain.java b/platform/org.eclipse.platform/src/org/eclipse/core/launcher/WebStartMain.java
index cf4e9b4..5c5370b 100644
--- a/platform/org.eclipse.platform/src/org/eclipse/core/launcher/WebStartMain.java
+++ b/platform/org.eclipse.platform/src/org/eclipse/core/launcher/WebStartMain.java
@@ -27,8 +27,8 @@
private static final String DEFAULT_OSGI_BUNDLES = "org.eclipse.equinox.common@2:start, org.eclipse.core.runtime@start"; //$NON-NLS-1$
private static final String PROP_OSGI_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
private static final String PROP_WEBSTART_PRECISE_BUNDLEID = "eclipse.webstart.preciseBundleId"; //$NON-NLS-1$
+ private static final String JAVA_6 = "1.6";
-
private String[] allJars = null; //List all the jars that are on the classpath
private Map bundleList = null; //Map an entry (the part before the @) from the osgi.bundles list to a list of URLs. Ie: org.eclipse.core.runtime --> file:c:/foo/org.eclipse.core.runtime_3.1.0/..., file:c:/bar/org.eclipse.core.runtime/...
private Map bundleStartInfo = null; //Keep track of the start level info for each bundle from the osgi.bundle list.
@@ -49,6 +49,8 @@
protected void basicRun(String[] args) throws Exception {
preciseIdExtraction = Boolean.getBoolean(PROP_WEBSTART_PRECISE_BUNDLEID);
+ if (checkVersion(System.getProperty("java.version"), JAVA_6))
+ preciseIdExtraction = true;
setDefaultBundles();
addOSGiBundle();
initializeBundleListStructure();