jpackage fails with java.io.IOException (exit code 14) during Wix candle.exe step on Windows

6 days ago 7
ARTICLE AD BOX

I am trying to package my Java Swing application into an .exe using jpackage (JDK 21) on Windows 11. I have installed wix v3.11and added its bin folder to my System PATH.

However, the build process fails during the compilation phase with the following error:

java.io.IOException: Command [candle.exe, -nologo, C:\Users\ardaa\AppData\Local\Temp\jdk.jpackage4186823937322965219\config\bundle.wxf, -ext, WixUtilExtension, -arch, x64, -out, C:\Users\ardaa\AppData\Local\Temp\jdk.jpackage4186823937322965219\wixobj\bundle.wixobj, -dJpAppDescription=GrayScreenTherapy, -dJpAppVersion=1.2.0, -dJpProductCode=18efba89-13a7-3136-9715-513004761b53, -dJpAppName=GrayScreenTherapy, -dJpAllowUpgrades=yes, -dJpProductUpgradeCode=31e14c48-3ed8-3734-8e0c-b15a54fd71fd, -dJpIsSystemWide=yes, -dJpAllowDowngrades=yes, -dJpIcon=C:\Users\ardaa\AppData\Local\Temp\jdk.jpackage4186823937322965219\image\GrayScreenTherapy\GrayScreenTherapy.exe, -dJpAppVendor=Arda Akkas, -dJpAppSizeKb=126286, -dJpConfigDir=C:\Users\ardaa\AppData\Local\Temp\jdk.jpackage4186823937322965219\config] in C:\Users\ardaa\AppData\Local\Temp\jdk.jpackage4186823937322965219\image\GrayScreenTherapy exited with 14 code

What does exit code 14 specifically mean for candle.exe in the context of jpackage, and how can I resolve this resource access issue?

jpackage --input target/ --name "GrayScreenTherapy" --main-jar GrayScreenTherapy-1.0-SNAPSHOT.jar --main-class Main --type exe --win-menu --icon app.ico --vendor "Arda Akkas" --app-version 1.2

Read Entire Article