8

I am trying to package an application with jpackage for windows. I am using java 19 and wix 4.

Package Id      Version              Commands
---------------------------------------------
wix             4.0.0-preview.1      wix
java 19.0.1 2022-10-18
Java(TM) SE Runtime Environment (build 19.0.1+10-21)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)

According to the Packaging Tool User's Guide, the requirements for generating an installation package for windows are:

WiX 3.0 or later is required.

However, when trying to generate a package I get an error:

[09:26:34.026] Can not find WiX tools (light.exe, candle.exe)
[09:26:34.026] Download WiX 3.0 or later from https://wixtoolset.org and add it to the PATH.

The very nature of the problem is clear. package does not support wix 4, although it is not written anywhere in plain text.

The solution is also clear, I install wix 3. However, here comes the "problem". Wix 3 requires an old version of .Net (3.5.1) or at least "windows features .net 3.5.1". However, this is what I want to avoid.

My question is, as of today, is there a way to directly use wix 4 with jpackage?

mr mcwolf
  • 2,574
  • 2
  • 14
  • 27
  • Are `light` and `candle` not included in `wix 4`? They have to be on the PATH I think for `jpackage` to find them. – Jorn Vernee Nov 19 '22 at 13:47
  • @JornVernee, Yes, in `wix 4` the two tools, `light.exe` and `candle.exe` are replaced by a common one named `wix.exe`. The new `wix.exe` tool has an option to convert projects from `wix 3` to `wix 4` which gives a chance to manually migrate a package already generated by `jpakager` with `wix 3` (as long as its temp files are available). But I don't know if the effort is worth it. I find it easier to generate the app-image with `jpakager` (or if I use my launcher with `jlink`) and do the installer with `inno setup` (due to fewer dependencies). – mr mcwolf Nov 19 '22 at 15:05
  • 2
    Did you learn anything more about this? Is there an enhancement request to support Wix 4 (I couldn't find any)? – Slaw Mar 28 '23 at 07:08
  • Just to add I have the identical problem. I am using jpackage version: 17.0.7 the version of jpackage that sipped with my GraalVM v17. Is jpackage that ships with GraalVM v20, Wix 4 compatible? – Michael Ellis Jul 10 '23 at 14:07

0 Answers0