--- old/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java 2015-11-19 17:01:45.000000000 +0300 +++ new/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java 2015-11-19 17:01:45.000000000 +0300 @@ -248,7 +248,7 @@ if (LAUNCHER_CFG_FORMAT.fetchFrom(p).equals(CFG_FORMAT_PROPERTIES)) { writeCfgFile(p, rootDir); } else { - writeCfgFile(p, new File(rootDir, getLauncherCfgName(p)), "$APPDIR/runtime"); + writeCfgFile(p, new File(rootDir, getLauncherCfgName(p)), getRuntimeLocation(p)); } } @@ -269,16 +269,20 @@ } } + private String getRuntimeLocation(Map params) { + if (LINUX_RUNTIME.fetchFrom(params) == null) { + return ""; + } else { + return "$APPDIR/runtime"; + } + } + private void writeCfgFile(Map params, File rootDir) throws FileNotFoundException { File cfgFile = new File(rootDir, getLauncherCfgName(params)); cfgFile.delete(); PrintStream out = new PrintStream(cfgFile); - if (LINUX_RUNTIME.fetchFrom(params) == null) { - out.println("app.runtime="); - } else { - out.println("app.runtime=$APPDIR/runtime"); - } + out.println("app.runtime=" + getRuntimeLocation(params)); out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next()); out.println("app.version=" + VERSION.fetchFrom(params)); --- old/modules/fxpackager/src/main/java/com/oracle/tools/packager/mac/MacAppBundler.java 2015-11-19 17:01:46.000000000 +0300 +++ new/modules/fxpackager/src/main/java/com/oracle/tools/packager/mac/MacAppBundler.java 2015-11-19 17:01:46.000000000 +0300 @@ -497,7 +497,7 @@ if (LAUNCHER_CFG_FORMAT.fetchFrom(p).equals(CFG_FORMAT_PROPERTIES)) { writeCfgFile(p, rootDirectory); } else { - writeCfgFile(p, new File(rootDirectory, getLauncherCfgName(p)), "$APPDIR/PlugIns/Java.runtime"); + writeCfgFile(p, new File(rootDirectory, getLauncherCfgName(p)), getRuntimeLocation(p)); } } @@ -662,6 +662,14 @@ } } + private String getRuntimeLocation(Map params) { + if (MAC_RUNTIME.fetchFrom(params) == null) { + return ""; + } else { + return "$APPDIR/PlugIns/Java.runtime"; + } + } + private void writeInfoPlist(File file, Map params) throws IOException { Log.verbose(MessageFormat.format(I18N.getString("message.preparing-info-plist"), file.getAbsolutePath())); @@ -1124,11 +1132,7 @@ pkgInfoFile.delete(); PrintStream out = new PrintStream(pkgInfoFile); - if (MAC_RUNTIME.fetchFrom(params) == null) { - out.println("app.runtime="); - } else { - out.println("app.runtime=$APPDIR/PlugIns/Java.runtime"); - } + out.println("app.runtime=" + getRuntimeLocation(params)); out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next()); out.println("app.version=" + VERSION.fetchFrom(params)); //for future AU support (to be able to find app in the registry) --- old/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java 2015-11-19 17:01:47.000000000 +0300 +++ new/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java 2015-11-19 17:01:46.000000000 +0300 @@ -365,7 +365,7 @@ if (LAUNCHER_CFG_FORMAT.fetchFrom(p).equals(CFG_FORMAT_PROPERTIES)) { writeCfgFile(p, rootDirectory); } else { - writeCfgFile(p, new File(rootDirectory, getLauncherCfgName(p)), "$APPDIR\\runtime"); + writeCfgFile(p, new File(rootDirectory, getLauncherCfgName(p)), getRuntimeLocation(p)); } // Copy executable root folder @@ -418,17 +418,21 @@ } } + private String getRuntimeLocation(Map params) { + if (WIN_RUNTIME.fetchFrom(params) == null) { + return ""; + } else { + return "$APPDIR\\runtime"; + } + } + private void writeCfgFile(Map params, File rootDir) throws FileNotFoundException { File cfgFile = new File(rootDir, getLauncherCfgName(params)); cfgFile.delete(); PrintStream out = new PrintStream(cfgFile); - if (WIN_RUNTIME.fetchFrom(params) == null) { - out.println("app.runtime="); - } else { - out.println("app.runtime=$APPDIR\\runtime"); - } + out.println("app.runtime=" + getRuntimeLocation(params)); out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next()); out.println("app.version=" + VERSION.fetchFrom(params)); //for future AU support (to be able to find app in the registry)