| Summary: | Cannot launch Eclipse from UNC path | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Linda Sabourin <lindasab> |
| Component: | Resources | Assignee: | Platform-Resources-Inbox <platform-resources-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | minor | ||
| Priority: | P2 | ||
| Version: | 2.0.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
In a nutshell, installing Eclipse using a UNC path, or trying to run Eclipse afterwards using a UNC path will just not work. There are several steps involved in the Eclipse startup sequence: 1. The launcher (eclipse.exe) takes its executable path and looks for the "startup.jar" file which contains the Java platform launching code. This logic appears to support UNC paths since the launcher finds the startup.jar file and the JVM is launched. 2. The platform launching code (in startup.jar) uses its class path (specified by the launcher) to find the config file in the workspace and to create the boot URL. If the location of the startup.jar file is <installDir>/eclipse/startup.jar, then the boot URL created is: file:<installDir>/eclipse/plugins/org.eclipse.core.boot_2.0.2/boot.jar If the config file is not found, a new one is created but if the boot.jar file cannot be found, Eclipse does not run (see the first exception below). 3. If the boot.jar file can be found, the core.boot plug-in starts the workbench assuming the core.runtime plug-ins are in sibling directories. If also uses the install directory to add several plug-in subdirectories to the library path so that DLLs can be loaded via System.loadLibrary(). 4. As part of starting up the workbench, features and plug-ins defined in Eclipse extensions are logically added to the list of default plug-ins (e.g., <installDir>/eclipse/plugins). These extensions are found by parsing all of the files in the <installDir>/eclipse/links directory. The format of the extension locations in these link files does not support UNC paths (I tried). I installed Eclipse on the file system and then attempted to run Eclipse where eclipse.exe was referenced using a UNC path. The error message in the .log file was: java.lang.RuntimeException: Could not find bootstrap code. Check location of boot plug-in or specify -boot. at org.eclipse.core.launcher.Main.searchForBoot(Main.java:424) at org.eclipse.core.launcher.Main.getBootPath(Main.java:394) at org.eclipse.core.launcher.Main.basicRun(Main.java:237) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) This implies that the default logic in the Java launcher code does not support UNC paths. However, I tried adding the –boot switch specifying the boot.jar file using the URL syntax with a UNC path and then the following error occurred: java.lang.ClassNotFoundException: org.eclipse.core.boot.BootLoader at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:262) at org.eclipse.core.launcher.Main.getBootLoader(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:244) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) This error seems to indicate the mechanism used by Eclipse to extend the class path does not appear to support UNC paths. The boot.jar file was found but when added to the class path, classes in that jar file could not be found. The next step was to modify the –boot switch specifying the boot.jar file so that the URL syntax did not use a UNC path and the following error occurred: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: java.lang.RuntimeException: Fatal Error: Unable to locate matching org.eclipse.core.runtime plugin. at org.eclipse.core.internal.boot.PlatformConfiguration.locateDefaultPlugins (PlatformConfiguration.java:2212) at org.eclipse.core.internal.boot.PlatformConfiguration.<init> (PlatformConfiguration.java:879) at org.eclipse.core.internal.boot.PlatformConfiguration.startup (PlatformConfiguration.java:1343) at org.eclipse.core.internal.boot.InternalBootLoader.initialize (InternalBootLoader.java:568) at org.eclipse.core.internal.boot.InternalBootLoader.startup (InternalBootLoader.java:960) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:824) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) ... 7 more When Eclipse extends the class path for other plug-ins (e.g., org.eclipse.core.runtime), the same problem appears to occur since the install path still contains the UNC format. Conclusion: UNC paths are not supported by Eclipse.