src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java
branchJDK-8200758-branch
changeset 57414 6eda749d3117
parent 57407 2c14fbeff1dc
child 57438 4a31db8d42bd
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java	Mon Jun 17 15:38:04 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java	Thu Jun 20 14:13:50 2019 -0400
@@ -456,6 +456,7 @@
             File lfile = new File(licenseFile);
             File destFile = new File(CONFIG_ROOT.fetchFrom(params),
                     lfile.getName());
+
             IOUtils.copyFile(lfile, destFile);
             destFile.setWritable(true);
             ensureByMutationFileIsRTF(destFile);
@@ -666,8 +667,11 @@
             data.put("JpIsSystemWide", "yes");
         }
 
-        if (LICENSE_FILE.fetchFrom(params) != null) {
-            data.put("JpLicenseRtf", LICENSE_FILE.fetchFrom(params));
+        String licenseFile = LICENSE_FILE.fetchFrom(params);
+        if (licenseFile != null) {
+            String lname = new File(licenseFile).getName();
+            File destFile = new File(CONFIG_ROOT.fetchFrom(params), lname);
+            data.put("JpLicenseRtf", destFile.getAbsolutePath());
         }
 
         // Copy CA dll to include with installer