Title: JDK 21 jpackage fails to create Windows EXE installer with WiX Toolset 3.11 — candle.exe exits with code 14
07:01 10 Oct 2026

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.MainKt

  • Packaging tool: JDK jpackage.exe

  • WiX 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

  1. Verified that WiX Toolset 3.11.2.4516 is installed.

  2. Tried both the system WiX installation and the project-local WiX 3.11 directory.

  3. Confirmed that candle.exe successfully compiles a minimal WiX MSI source file.

  4. Captured the temporary bundle.wxf generated by jpackage, 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.

  5. The original jpackage log does not expose the detailed WiX compiler error.

Questions

  1. What are the documented causes of candle.exe exiting with code 14 when invoked by JDK 21 jpackage while creating a Windows EXE installer?

  2. Is WiX Toolset 3.11.2.4516 fully compatible with JDK 21 jpackage for --type exe?

  3. How can I preserve the temporary jpackage files or obtain the complete candle.exe diagnostics?

  4. Are there known issues involving WixUtilExtension.dll, Windows installer bundle generation, or the generated bundle.wxf file?

I would appreciate a solution specific to this failure rather than general instructions for configuring Gradle or Java.

kotlin