While executing the command
jpackage -t exe --name demobasit --description "deneme aciklamasi" --app-version 1.0 --input out/artifacts/demobasit_jar --dest C:\Users\Yusuf\Documents\yazilimim --icon src\sample\soundforge.ico --main-jar demobasit.jar --module-path "C:\Program Files\Java\JavaFX\openjfx-20.0.2_windows-x64_bin-sdk\javafx-sdk-20.0.2\lib" --add-modules javafx.controls,javafx.media,javafx.fxml --win-shortcut --win-menu
in powershell, I encountered a java.io.IOException with the error message:
Command [candle.exe, -nologo, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage12319285200917365654\config\bundle.wxf, -ext, WixUtilExtension, -arch, x64, -out, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage12319285200917365654\wixobj\bundle.wixobj] in C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage12319285200917365654\images\win-msi.image\demobasit exited with 14 code
I anticipated deploying my JavaFX project, yet after reinstalling Wix and verifying file paths, the issue remains unresolved. I require guidance in troubleshooting and resolving this problem with the jpackage tool.
I can confirm file path accuracy and accessibility if needed.
It is possible that my Java application requires MySQL, JavaFX dependencies or libraries that have not been correctly configured or included in the command.
I can search for any available updates or patches for the jpackage tool or the JavaFX library if needed.
There are additional error messages or stack traces that appear with the java.io.IOException when the --verbose option is enabled.
[21:18:31.257] Running candle.exe
[21:18:31.394] Running light.exe
[21:18:31.621] Detected [candle.exe] version [3.11.2.4516].
[21:18:31.621] Detected [light.exe] version [3.11.2.4516].
[21:18:31.622] WiX 3.11.2.4516 detected. Enabling advanced cleanup action.
[21:18:37.278] Command [PID: -1]:
jlink --output C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit\runtime --module-path C:\\Program Files\\Java\\JavaFX\\openjfx-20.0.2_windows-x64_bin-sdk\\javafx-sdk-20.0.2\\lib;C:\\Program Files\\Java\\jdk-17\\jmods --add-modules javafx.controls,javafx.fxml,javafx.media --strip-native-commands --strip-debug --no-man-pages --no-header-files
[21:18:37.279] Output:
[21:18:37.282] Returned: 0
[21:18:37.289] Using custom package resource [icon] (loaded from file C:\Users\Yusuf\eclipse-workspace\demobasit\src\sample\soundforge.ico).
[21:18:37.307] Warning: Windows Defender may prevent jpackage from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory "C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893".
[21:18:37.435] Using default package resource WinLauncher.template [Template for creating executable properties file] (add demobasit.properties to the resource-dir to customize).
[21:18:37.942] MSI ProductCode: 1b6f4367-572d-309b-a01a-303a3daa9cb9.
[21:18:37.942] MSI UpgradeCode: b13875dc-7fb8-31d2-9fc4-415e6bc28c5b.
[21:18:37.975] Using default package resource main.wxs [Main WiX project file] (add main.wxs to the resource-dir to customize).
[21:18:37.977] Using default package resource overrides.wxi [Overrides WiX project file] (add overrides.wxi to the resource-dir to customize).
[21:18:37.981] Preparing MSI config: C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-exe.image\demobasit-1.0.msi.
[21:18:37.983] Generating MSI: C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-exe.image\demobasit-1.0.msi.
[21:18:37.992] Running candle.exe in C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit
[21:18:38.312] Command [PID: 15244]:
candle.exe -nologo C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\main.wxs -ext WixUtilExtension -arch x64 -out C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\wixobj\main.wixobj -dJpAppDescription=deneme aciklamasi -dJpProductCode=1b6f4367-572d-309b-a01a-303a3daa9cb9 -dJpAppName=demobasit -dJpIsSystemWide=yes -dJpAllowDowngrades=yes -dJpIcon=C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit\demobasit.exe -dJpAppSizeKb=85233 -dJpAppVersion=1.0 -dJpAllowUpgrades=yes -dJpProductUpgradeCode=b13875dc-7fb8-31d2-9fc4-415e6bc28c5b -dJpAppVendor=Unknown -dJpConfigDir=C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config
[21:18:38.312] Output:
main.wxs
[21:18:38.312] Returned: 0
[21:18:38.313] Running candle.exe in C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit
[21:18:38.584] Command [PID: 3292]:
candle.exe -nologo C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf -ext WixUtilExtension -arch x64 -out C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\wixobj\bundle.wixobj
[21:18:38.585] Output:
bundle.wxf
C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf(11) : error CNDL0014 : The Shortcut/@Icon attribute's value, '?con_313380542', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf(21) : error CNDL0014 : The Shortcut/@Icon attribute's value, '?con_313380542', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf(896) : error CNDL0014 : The Icon/@Id attribute's value, '?con_313380542', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
[21:18:38.585] Returned: 14
[21:18:38.585] java.io.IOException: Command [candle.exe, -nologo, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf, -ext, WixUtilExtension, -arch, x64, -out, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\wixobj\bundle.wixobj] in C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit exited with 14 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:90)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.execute(WixPipeline.java:135)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.compile(WixPipeline.java:128)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.buildMsi(WixPipeline.java:84)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.buildMSI(WinMsiBundler.java:554)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:415)
at jdk.jpackage/jdk.jpackage.internal.WinExeBundler.bundle(WinExeBundler.java:104)
at jdk.jpackage/jdk.jpackage.internal.WinExeBundler.execute(WinExeBundler.java:77)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:676)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:550)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
[21:18:38.663] jdk.jpackage.internal.PackagerException: java.io.IOException: Command [candle.exe, -nologo, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf, -ext, WixUtilExtension, -arch, x64, -out, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\wixobj\bundle.wixobj] in C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit exited with 14 code
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:418)
at jdk.jpackage/jdk.jpackage.internal.WinExeBundler.bundle(WinExeBundler.java:104)
at jdk.jpackage/jdk.jpackage.internal.WinExeBundler.execute(WinExeBundler.java:77)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:676)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:550)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.io.IOException: Command [candle.exe, -nologo, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\config\bundle.wxf, -ext, WixUtilExtension, -arch, x64, -out, C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\wixobj\bundle.wixobj] in C:\Users\Yusuf\AppData\Local\Temp\jdk.jpackage16596374971741727893\images\win-msi.image\demobasit exited with 14 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:90)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.execute(WixPipeline.java:135)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.compile(WixPipeline.java:128)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.buildMsi(WixPipeline.java:84)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.buildMSI(WinMsiBundler.java:554)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:415)
... 6 more
Here is the screenshot after adding the --verbose option
I can verify the successful installation of Wix along with all necessary components. If required, I can experiment with different command variations or options to troubleshoot the issue.
I am unsure if there are other tools or utilities to use with jpackage for creating executable files or installers. I searched relevant forums and online communities for solutions to similar issues with jpackage, but with no success.
Maybe to late, but:
Try to create your executable file with this application:
https://github.com/davidweber411/Java2NativeWinConverter
It provides a nice GUI. Just click some things and that's it.
Note:
It uses JDK 17.
The application creates a working jpackage command and you can either copy and alter it or execute it directly.