Bug 28656 - [launcher] Can't run eclipse from a UNC pathname
Summary: [launcher] Can't run eclipse from a UNC pathname
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Jeff McAffer CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
: 33265 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-18 22:00 EST by Ed Burnette CLA
Modified: 2005-09-27 09:12 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Burnette CLA 2002-12-18 22:00:41 EST
I'm trying to set up a public version of Eclipse that everyone on our network 
can run without installing anything. So I installed it on my XP machine (works 
fine) then copied the entire Eclipse directory to a network location. The path 
name for the executable is something like 
\\machinename\tools\Eclipse\bin\Eclipse.exe . When I try to invoke this (from 
a Command window with the UNC path, or by adding it to my PATH and 
running 'Eclipse.exe', or by looking at the directory in the Windows explorer 
and double clicking Eclipse.exe), I get an error dialog that says:
'Problems during startup. Check the ".log" file in the ".metadata" directory 
of your workspace.' That file contains these lines:

!SESSION ----------------------------------------------------------------------
!ENTRY org.eclipse.core.launcher 4 0 Dec 18, 2002 22:13:33.991
!MESSAGE Exception launching the Eclipse Platform:
!STACK
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)

I tried some variants of the -boot and -configuration options but couldn't get 
it to work.

For various reasons I can't ask my users to map a network drive to this 
location but if I do that as a test, for example I map drive letter Z: to 
\\machinename\tools and run 'z:\Eclipse\bin\eclipse.exe' then it works just 
fine. So it looks like a problem with the system using a UNC pathname.
Comment 1 DJ Houghton CLA 2003-02-26 11:02:13 EST
*** Bug 33265 has been marked as a duplicate of this bug. ***
Comment 2 Mike Wilson CLA 2003-04-25 07:28:09 EDT
Do we know why this is happening yet? If it's a limitation of the Java VM, then there's not much we 
can do. If it's a just a bug in our code, then we should find it and fix it. UNC is part of the platform, 
and we should support it.
Comment 3 Jeff McAffer CLA 2004-03-25 15:53:47 EST
Should try the new runtime on UNC paths to confirm that our URL handling is 
correct.
Comment 4 Pascal Rapicault CLA 2004-04-30 18:15:23 EDT
Assigning to Jeff since he is the last one who commented it :-)
Comment 5 Jeff McAffer CLA 2004-05-07 03:23:22 EDT
I spent about a day going over the code in Main and the lower levels of OSGi to 
find everywhere that we are manipulating paths/URLs.  The basic rule is:

if it is (or you want) a file: URL then to do any manipulation you have to make 
a java.io.File and use .toURL().  This does the right thing withrespect to /.  
This is true for both UNC paths as well as normal paths.  There is some dispute 
about the normal case since File.toURL() will insert a / before the c:.  This 
is totally legal and actually the most correct answer.  People are bummed 
however because that means that URL.getFile() returns sometihng like /c:/foo.  
The File constructors handle this just fine so it is really only an issue if 
you are comparing URLs or showing them to users.

In either case you should be normalizing the URLs before comparison.  In the 
case of a file: URL, the normalization process is to convert to File first and 
then compare.  File comparison handles the / diffs as well as the appropriate 
case handling.

Anyway, I have done rudimentary testing for all combinations of Eclipse 
installed on a UNC path/normal path and the workspace on a UNC path/normal path.

There may well be bugs in other parts of Eclipse which may do URL 
manipulation.  If so, bugs should be opened in those components.