diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java')
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java index 34bcf44d3..bbec0b646 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java @@ -2137,7 +2137,7 @@ public class Main { Properties props = new Properties(); InputStream is = null; try { - is = url.openStream(); + is = getStream(url); props.load(is); } finally { if (is != null) @@ -2150,6 +2150,17 @@ public class Main { return props; } + private InputStream getStream(URL location) throws IOException { + if ("file".equalsIgnoreCase(location.getProtocol())) { //$NON-NLS-1$ + // this is done to handle URLs with invalid syntax in the path + File f = new File(location.getPath()); + if (f.exists()) { + return new FileInputStream(f); + } + } + return location.openStream(); + } + /* * Handle splash screen. * The splash screen is displayed natively. Whether or not the splash screen |