1

I have an application where I bundle JRE inside the main installer, I first create the installer for JRE, and then package is inside the main installer.

I was using the jdk-8u152 and I am upgrading it to JDK >= 14.0.2 and using wix to create MSI and installer.

After creating a new JRE MSI with 14.0.2 version every file is copied except jre/bin/server/jvm.dll This is because in jdk-8u152 we have file version for this dll as 25.71.0.1 and in jdk-14.0.2 the file version is 14.0.2.0 so during the upgrade it is removing the old jvm.dll but not copying the new jvm.dll.

Is there is any way I can tell Wix to ignore the file version for this file? I tried to set keypath as no but it still doesn't work. The only way it is working now is if I uninstall the old version and then installing the new one(but this approach will not work in production environments).

   <Component Id="cmpC382483B5DD26ED7C03CDDC0619B42D9" Guid="{1413DBE0-340B-43A5-913C-2219B75919D6}">
           <File Id="fil22C606D5B3214BF3F981341EF52BE00A" KeyPath="no" Source="$(var.JREDir)\bin\server\jvm.dll" />
   </Component>

JVM DLL for jdk-8u152

Nitish Bhagat
  • 98
  • 1
  • 9
  • [Please have a look at this answer and its links](https://stackoverflow.com/a/60854570/129130). You should not use JDK for distribution, only JRE. Can you change the installation location for the JRE folder and point your binaries to it? That will de-couple the old and the new state and this problem should be avoided. – Stein Åsmul Feb 25 '21 at 16:39
  • setting ```keypath=no``` works , i had the problem with my setup where the .wxs file was automatically generated. However, we want to distribute JRE but that is not an option in openjdk >= 9 – Nitish Bhagat Feb 26 '21 at 08:48

0 Answers0