Index: trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Version.java	(revision 14404)
+++ trunk/src/org/openstreetmap/josm/data/Version.java	(revision 14406)
@@ -6,4 +6,6 @@
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URL;
+import java.nio.file.InvalidPathException;
 import java.util.Map.Entry;
 import java.util.Optional;
@@ -105,5 +107,5 @@
      */
     public void init() {
-        try (InputStream stream = Version.class.getResourceAsStream("/REVISION")) {
+        try (InputStream stream = openRevisionStream("/REVISION")) {
             if (stream == null) {
                 Logging.warn(tr("The revision file ''/REVISION'' is missing."));
@@ -118,4 +120,17 @@
     }
 
+    private static InputStream openRevisionStream(String path) throws IOException {
+        try {
+            return Version.class.getResourceAsStream(path);
+        } catch (InvalidPathException e) {
+            Logging.error("Cannot open {0}: {1}", path, e.getMessage());
+            URL betterUrl = Utils.betterJarUrl(Version.class.getResource(path));
+            if (betterUrl != null) {
+                return betterUrl.openStream();
+            }
+            return null;
+        }
+    }
+
     /**
      * Replies the version string. Either the SVN revision "1234" (as string) or the
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 14404)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 14406)
@@ -227,5 +227,11 @@
             if (name != null && name.startsWith("resource://")) {
                 String resourceName = name.substring("resource:/".length());
-                InputStream is = getClass().getResourceAsStream(resourceName);
+                InputStream is = null;
+                try {
+                    is = getClass().getResourceAsStream(resourceName);
+                } catch (InvalidPathException e) {
+                    Logging.error("Cannot open {0}: {1}", resourceName, e.getMessage());
+                    Logging.trace(e);
+                }
                 if (is == null) {
                     URL resource = getClass().getResource(resourceName);
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 14404)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 14406)
@@ -138,4 +138,14 @@
     }
 
+    private static String format(String text, Object... objects) {
+        try {
+            return MessageFormat.format(text, objects);
+        } catch (InvalidPathException e) {
+            System.err.println("!!! Unable to format '" + text + "': " + e.getMessage());
+            e.printStackTrace();
+            return null;
+        }
+    }
+
     /**
      * Translates some text for the current locale.
@@ -162,5 +172,5 @@
     public static String tr(String text, Object... objects) {
         if (text == null) return null;
-        return MessageFormat.format(gettext(text, null), objects);
+        return format(gettext(text, null), objects);
     }
 
@@ -182,5 +192,5 @@
         if (text == null)
             return null;
-        return MessageFormat.format(gettext(text, context), (Object) null);
+        return format(gettext(text, context), (Object) null);
     }
 
@@ -190,5 +200,5 @@
         if (text == null)
             return null;
-        return MessageFormat.format(gettextLazy(text, context), (Object) null);
+        return format(gettextLazy(text, context), (Object) null);
     }
 
@@ -235,5 +245,5 @@
      */
     public static String trn(String singularText, String pluralText, long n, Object... objects) {
-        return MessageFormat.format(gettextn(singularText, pluralText, null, n), objects);
+        return format(gettextn(singularText, pluralText, null, n), objects);
     }
 
@@ -262,5 +272,5 @@
      */
     public static String trnc(String context, String singularText, String pluralText, long n, Object... objects) {
-        return MessageFormat.format(gettextn(singularText, pluralText, context, n), objects);
+        return format(gettextn(singularText, pluralText, context, n), objects);
     }
 
@@ -348,5 +358,5 @@
     }
 
-    static void setupJavaLocaleProviders() {
+    static String setupJavaLocaleProviders() {
         // Look up SPI providers first (for JosmDecimalFormatSymbolsProvider).
         // Enable CLDR locale provider on Java 8 to get additional languages, such as Khmer.
@@ -355,10 +365,19 @@
         // See https://docs.oracle.com/javase/9/docs/api/java/util/spi/LocaleServiceProvider.html
         try {
-            // Don't call Utils.updateSystemProperty to avoid spurious log at startup
-            System.setProperty("java.locale.providers", "SPI,JRE,CLDR");
+            try {
+                // First check we're able to open a stream to our own SPI file
+                // Java will fail on Windows if the jar file is in a folder with a space character!
+                I18n.class.getResourceAsStream("/META-INF/services/java.text.spi.DecimalFormatSymbolsProvider").close();
+                // Don't call Utils.updateSystemProperty to avoid spurious log at startup
+                return System.setProperty("java.locale.providers", "SPI,JRE,CLDR");
+            } catch (RuntimeException | IOException e) {
+                // Don't call Logging class, it may not be fully initialized yet
+                System.err.println("Unable to set SPI locale provider: " + e.getMessage());
+            }
         } catch (SecurityException e) {
             // Don't call Logging class, it may not be fully initialized yet
             System.err.println("Unable to set locale providers: " + e.getMessage());
         }
+        return System.setProperty("java.locale.providers", "JRE,CLDR");
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 14404)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 14406)
@@ -31,4 +31,5 @@
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.InvalidPathException;
 import java.util.Arrays;
 import java.util.Base64;
@@ -1165,5 +1166,11 @@
             synchronized (getSvgUniverse()) {
                 try {
-                    URI uri = getSvgUniverse().loadSVG(path);
+                    URI uri = null;
+                    try {
+                        uri = getSvgUniverse().loadSVG(path);
+                    } catch (InvalidPathException e) {
+                        Logging.error("Cannot open {0}: {1}", path, e.getMessage());
+                        Logging.trace(e);
+                    }
                     if (uri == null && "jar".equals(path.getProtocol())) {
                         URL betterPath = Utils.betterJarUrl(path);
