Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Build Identifier: Eclipse 3.5.1 If the user id contains a "#" on windows, the @user.home variable in config.ini do not evaluate correctly. Reproducible: Always Steps to Reproduce: 1. Add the following property osgi.instance.area=@user.home/workspace 2. Verify that the user id has a "#", e.g. IV#532 3. Bring up eclipse and see the workspace prompt evaluate to something like C:\Documents and Settings\IV instead of C:\Documents and Settings\IV#532\workspace.
Cause appears to be in the LocationManager.initialiseLocations() method The issue is caused the way that Eclipse internally creates Location objects from URLs. “# ? &“ are all special characters within URLs. Below is an example of constructing a URL with a user’s directory, whose name includes a “#” char URL url = new File( new File( "c:\\documents and settings" ), "#robin" ).toURL(); // eclipse uses this method for storing the location System.out.println( "File:" + url.getFile() ); // these are other parts so you can see where the #robin user name // goes. obviously this will affect any user name with a #?& and any // other non-escaped special URL character System.out.println( "Query:" + url.getQuery() ); System.out.println( "Path:" + url.getPath() ); System.out.println( "Ref:" + url.getRef() ); Output: File:/c:/documents and settings/ Query:null Path:/c:/documents and settings/ Ref:robin The user name gets stored as the “.ref” part of the URL. Eclipse uses the url.getFile() method, which does not include the ref, when creating the User Location used in the tool. The two classes causing the headaches are LocationManager.buildLocation() (line 155) and BasicLocation.setURL() (121).
This is a known issue and documented in the README that is shipped with the SDK. See also bug 312772. *** This bug has been marked as a duplicate of bug 3109 ***