Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 183936 - [jws] [rcp] JavaWebStart and RCP doesn't work with Java 1.6
Summary: [jws] [rcp] JavaWebStart and RCP doesn't work with Java 1.6
Status: VERIFIED WORKSFORME
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-25 04:07 EDT by Michael Seele CLA
Modified: 2007-05-14 06:12 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Seele CLA 2007-04-25 04:07:18 EDT
RCP & jws fails on java 1.6. the reason is that 1.6 Classloader.getResource (used in org.eclipse.core.launcher.WebStartMain.getAllJars()) behaves differently to the previous versions (1.4 & 1.5).
please see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6431929

this causes that loader.loadClass(STARTER); in org.eclipse.core.launcher.Main.invokeFramework(String[] passThruArgs, URL[] bootPath) fails.
Comment 1 Michael Seele CLA 2007-04-25 05:57:00 EDT
maybe that helps:

when i add the following code 

if (parent == null) {
    parent = Thread.currentThread().getContextClassLoader();
}

before line

URLClassLoader loader = new StartupClassLoader(bootPath, parent);

in org.eclipse.core.launcher.Main.invokeFramework(String[] passThruArgs, URL[]
bootPath), eclipse can load the STARTER(org.eclipse.core.runtime.adaptor.EclipseStarter) class and invoke the run method.

the reason why this works is that com.sun.javaws.Main.main(final String args[]) invokes this line: Thread.currentThread().setContextClassLoader(com.sun.jnlp.JNLPClassLoader.createClassLoader());
com.sun.javaws.Main and com.sun.jnlp.JNLPClassLoader are inside $JRE$\lib\javaws.jar.
com.sun.jnlp.JNLPClassLoader is the class which has changed from 1.5 to 1.6 and results the püroblem.

but now it fails later on org.eclipse.osgi.framework.internal.core.Framework.findVMProfile() in line url = systemBundle.getEntry(javaProfile);. this is caused by org.eclipse.osgi.internal.baseadaptor.SystemBundleData.createBundleFile(File osgiBase) which gets a wrong osgiBase File object.
Comment 2 Pascal Rapicault CLA 2007-04-25 08:25:12 EDT
Which version of 3.2 do you use? This bug has been fixed (in a conservative way) for 3.2.2 (see bug #169691).

Also, it has been fixed in 3.3, could you please confirm?
Note that you should wait until the 3.3 M7 is released because of bug #170373.
Comment 3 Michael Seele CLA 2007-04-25 09:36:16 EDT
ok, sorry!! i worked with 3.2.1. in 3.2.2 it works. :-)
i will confirm for 3.3 after M7 release.
Comment 4 Michael Seele CLA 2007-05-14 06:12:49 EDT
ok. it also works with 3.3 M7