src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java
branchJDK-8200758-branch
changeset 57450 82c78b40b39d
parent 57446 5a5b85f00a63
child 57687 c56bbf4aaf98
--- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java	Tue Jul 02 12:03:49 2019 -0400
+++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java	Wed Jul 03 17:36:06 2019 -0400
@@ -76,7 +76,6 @@
     private final Path contentsDir;
     private final Path javaDir;
     private final Path javaModsDir;
-    private final String relativeModsDir;
     private final Path resourcesDir;
     private final Path macOSDir;
     private final Path runtimeDir;
@@ -176,7 +175,6 @@
         this.contentsDir = root.resolve("Contents");
         this.javaDir = contentsDir.resolve("Java");
         this.javaModsDir = javaDir.resolve("mods");
-        this.relativeModsDir = "Java/mods";
         this.resourcesDir = contentsDir.resolve("Resources");
         this.macOSDir = contentsDir.resolve("MacOS");
         this.runtimeDir = contentsDir.resolve("runtime");
@@ -199,7 +197,6 @@
         this.contentsDir = root.resolve("Contents");
         this.javaDir = null;
         this.javaModsDir = null;
-        this.relativeModsDir = null;
         this.resourcesDir = null;
         this.macOSDir = null;
         this.runtimeDir = this.root;
@@ -278,11 +275,6 @@
     }
 
     @Override
-    public String getRelativeModsDir() {
-        return relativeModsDir;
-    }
-
-    @Override
     public void prepareApplicationFiles() throws IOException {
         Map<String, ? super Object> originalParams = new HashMap<>(params);
         // Generate PkgInfo
@@ -303,7 +295,7 @@
         executable.toFile().setExecutable(true, false);
         // generate main app launcher config file
         File cfg = new File(root.toFile(), getLauncherCfgName(params));
-        writeCfgFile(params, cfg, "$APPDIR/runtime");
+        writeCfgFile(params, cfg);
 
         // create additional app launcher(s) and config file(s)
         List<Map<String, ? super Object>> entryPoints =
@@ -321,7 +313,7 @@
 
             // add config file for add launcher
             cfg = new File(root.toFile(), getLauncherCfgName(tmp));
-            writeCfgFile(tmp, cfg, "$APPDIR/runtime");
+            writeCfgFile(tmp, cfg);
         }
 
         // Copy class path entries to Java folder
@@ -489,7 +481,7 @@
                 COPYRIGHT.fetchFrom(params) != null ?
                 COPYRIGHT.fetchFrom(params) : "Unknown");
         data.put("DEPLOY_LAUNCHER_NAME", getLauncherName(params));
-        data.put("DEPLOY_JAVA_RUNTIME_NAME", "$APPDIR/runtime");
+        data.put("DEPLOY_JAVA_RUNTIME_NAME", getCfgRuntimeDir());
         data.put("DEPLOY_BUNDLE_SHORT_VERSION",
                 VERSION.fetchFrom(params) != null ?
                 VERSION.fetchFrom(params) : "1.0.0");
@@ -539,14 +531,8 @@
 
         data.put("DEPLOY_LAUNCHER_CLASS", MAIN_CLASS.fetchFrom(params));
 
-        StringBuilder macroedPath = new StringBuilder();
-        for (String s : CLASSPATH.fetchFrom(params).split("[ ;:]+")) {
-            macroedPath.append(s);
-            macroedPath.append(":");
-        }
-        macroedPath.deleteCharAt(macroedPath.length() - 1);
-
-        data.put("DEPLOY_APP_CLASSPATH", macroedPath.toString());
+        data.put("DEPLOY_APP_CLASSPATH",
+                  getCfgClassPath(CLASSPATH.fetchFrom(params)));
 
         StringBuilder bundleDocumentTypes = new StringBuilder();
         StringBuilder exportedTypes = new StringBuilder();