Title: JDK 21 jpackage fails to create Windows EXE installer with WiX Toolset 3.11 — candle.exe exits with code 14
Environment
OS: Windows 10
JDK: Eclipse Temurin 21.0.12.1
Build system: Gradle 8.14.3
Language: Kotlin 2.1.0
UI framework: Compose Multiplatform 1.7.3
Main class:
com.drivesweep.MainKtPackaging tool: JDK
jpackage.exeWiX Toolset: 3.11.2.4516
Problem
Running the following Gradle task fails:
.\gradlew.bat :composeApp:packageExe
The error log reports:
Execution failed for task ':composeApp:packageExe'.
External tool execution failed:
Command: [...\jdk-21.0.12.101-hotspot\bin\jpackage.exe, @...\packageExe.args.txt]
Exit code: 1
The detailed jpackage error log reports:
java.io.IOException: Command [candle.exe, -nologo,
...\config\bundle.wxf,
-ext, WixUtilExtension,
-arch, x64,
-out, ...\wixobj\bundle.wixobj]
exited with 14 code
The application uses the standard Compose Desktop Gradle packaging task with --type exe, a runtime image, an application icon, per-user installation, Start Menu shortcut, and desktop shortcut.
Troubleshooting already performed
Verified that WiX Toolset 3.11.2.4516 is installed.
Tried both the system WiX installation and the project-local WiX 3.11 directory.
Confirmed that
candle.exesuccessfully compiles a minimal WiX MSI source file.Captured the temporary
bundle.wxfgenerated byjpackage, but the captured copy was truncated and produced an XML unexpected-end-of-file error. This may have been caused by copying it before generation completed.The original
jpackagelog does not expose the detailed WiX compiler error.
Questions
What are the documented causes of
candle.exeexiting with code 14 when invoked by JDK 21jpackagewhile creating a Windows EXE installer?Is WiX Toolset 3.11.2.4516 fully compatible with JDK 21
jpackagefor--type exe?How can I preserve the temporary
jpackagefiles or obtain the completecandle.exediagnostics?Are there known issues involving
WixUtilExtension.dll, Windows installer bundle generation, or the generatedbundle.wxffile?
I would appreciate a solution specific to this failure rather than general instructions for configuring Gradle or Java.