Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320732

Summary: Eclipse does not start on Windows when there is a # (sharp) in the path to eclipse
Product: [Eclipse Project] Equinox Reporter: Arne Deutsch <Arne.Deutsch>
Component: ComponentsAssignee: equinox.components-inbox <equinox.components-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: giachelini, remy.suen, tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Arne Deutsch CLA 2010-07-23 11:07:00 EDT
Build Identifier: 20090621-0832

If you try to start eclipse on a path with a sharp (e.g. "C:\my#\eclipse\" ) eclipse does not start but crashes with exit code 13.


Problem seems to be in:

org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
private URL getInstallLocation()


Problematic line:

path = new File(path).toURL().getFile();


At this point the path is truncated.


A simple program to reproduce the problem outside of eclipse:

import java.io.*;

public class Main {
	public static void main(String[] args) throws Exception {
		System.out.println(new File("C:/test#/testthis").toURL().getFile());
	}
}

Output is: "/C:/test"

Reproducible: Always

Steps to Reproduce:
1. Install eclipse on a path with a sharp (e.g. "C:\my#\eclipse" ) on windows XP
2. Start eclipse by double clicking "eclipse.exe"
3. Watch the crash screen.
Comment 1 Thomas Watson CLA 2010-07-23 11:29:20 EDT

*** This bug has been marked as a duplicate of bug 3109 ***