8223953: Fix CLASSPATH parsing for sub-directorys containing spaces JDK-8200758-branch
authorherrick
Thu, 06 Jun 2019 19:21:05 -0400
branchJDK-8200758-branch
changeset 57393 85998c745ee9
parent 57392 46d4b0aa4542
child 57394 17c43babfc2f
8223953: Fix CLASSPATH parsing for sub-directorys containing spaces Reviewed-by: asemenyuk, almatvee
src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java
src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java	Thu Jun 06 19:18:09 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java	Thu Jun 06 19:21:05 2019 -0400
@@ -196,8 +196,7 @@
             out.println("app.version=" + VERSION.fetchFrom(params));
             out.println("app.runtime=" + runtimeLocation);
             out.println("app.identifier=" + IDENTIFIER.fetchFrom(params));
-            out.println("app.classpath=" + String.join(File.pathSeparator,
-                    CLASSPATH.fetchFrom(params).split("[ :;]")));
+            out.println("app.classpath=" + CLASSPATH.fetchFrom(params));
 
             // The main app is required to be a jar, modular or unnamed.
             if (mainModule != null &&
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java	Thu Jun 06 19:18:09 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/StandardBundlerParam.java	Thu Jun 06 19:21:05 2019 -0400
@@ -141,7 +141,7 @@
                         String cp = (String) params.get("classpath");
                         return cp == null ? "" : cp;
                     },
-                    (s, p) -> s.replace(File.pathSeparator, " ")
+                    (s, p) -> s
             );
 
     static final StandardBundlerParam<String> MAIN_CLASS =