Windows 上的 jpackage:系统找不到文件,错误 103
jpackage on Windows: The system cannot find file, error 103
我正在尝试打包我使用 jpackage 构建的 ScalaFx 应用程序并在 windows 上遇到问题(mac 和 linux 工作正常)。
我正在使用 sbt assembly
构建一个 fat jar,然后使用 jpackage
创建一个 .msi
但是我收到此错误:
$ jpackage --win-shortcut --name krystalbull --app-version 0.1 --type msi -i target/scala-2.13/ --main-class com.krystal.bull.gui.GUI --main-jar krystal-bull-assembly-0.1.jar --icon src/main/resources/icons/krystal_bull.ico --verbose
shell: C:\Program Files\PowerShell\pwsh.EXE -command ". '{0}'"
env:
pkg-assembly: krystal-bull-assembly-0.1.jar
pkg-name: krystalbull
pkg-version: 0.1
JAVA_HOME_16.0.1_x64: C:\hostedtoolcache\windows\jdk.0.1\x64
JAVA_HOME: C:\hostedtoolcache\windows\jdk.0.1\x64
JAVA_HOME_16_0_1_X64: C:\hostedtoolcache\windows\jdk.0.1\x64
[21:10:32.469] Running candle.exe
[21:10:32.541] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe
[21:10:34.005] Running light.exe
[21:10:34.024] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe
[21:10:35.848] Detected [light.exe] version [3.11.2.4516].
[21:10:35.848] Detected [candle.exe] version [3.11.2.4516].
[21:10:35.849] WiX 3.11.2.4516 detected. Enabling advanced cleanup action.
[21:10:46.540] Command:
jlink --output C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\runtime --module-path C:\hostedtoolcache\windows\jdk\16.0.1\x64\jmods --add-modules jdk.management.jfr,java.rmi,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,jdk.jsobject,java.sql.rowset,jdk.sctp,jdk.jlink,jdk.unsupported,java.smartcardio,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,java.sql,jdk.incubator.vector,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.crypto.mscapi,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.internal.jvmstat,jdk.incubator.foreign,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,jdk.jpackage,java.management.rmi,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
[21:10:46.540] Output:
WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
[21:10:46.544] Returned: 0
(loaded from file D:\a\krystal-bull\krystal-bull\src\main\resources\icons\krystal_bull.ico).
[21:10:46.560] Using default package resource WinLauncher.template [Template for creating executable properties file] (add krystalbull.properties to the resource-dir to customize).
[21:10:47.532] MSI ProductCode: c47093f7-318f-3c33-b6f9-e8a8c4adb014.
[21:10:47.533] MSI UpgradeCode: c62bde9b-3ba1-3197-8853-ba4770495959.
[21:10:47.536] Using default package resource main.wxs [Main WiX project file] (add main.wxs to the resource-dir to customize).
[21:10:47.537] Using default package resource overrides.wxi [Overrides WiX project file] (add overrides.wxi to the resource-dir to customize).
[21:10:47.540] Preparing MSI config: D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi.
[21:10:47.541] Generating MSI: D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi.
[21:10:47.552] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull
[21:10:50.004] Command:
C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -nologo C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\main.wxs -ext WixUtilExtension -arch x64 -out C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj -dJpAppDescription=krystalbull -dJpAppVersion=0.1 -dJpProductCode=c47093f7-318f-3c33-b6f9-e8a8c4adb014 -dJpAppName=krystalbull -dJpAllowUpgrades=yes -dJpProductUpgradeCode=c62bde9b-3ba1-3197-8853-ba4770495959 -dJpIsSystemWide=yes -dJpAllowDowngrades=yes -dJpIcon=C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\krystalbull.exe -dJpAppVendor=Unknown -dJpConfigDir=C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config
[21:10:50.004] Output:
main.wxs
[21:10:50.005] Returned: 0
[21:10:50.005] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull
[21:10:51.344] Command:
C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -nologo C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf -ext WixUtilExtension -arch x64 -out C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj
[21:10:51.344] Output:
bundle.wxf
[21:10:51.346] Returned: 0
[21:10:51.348] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull
[21:10:53.013] Command:
C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe -nologo -spdb -ext WixUtilExtension -out D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi -sice:ICE27 -loc C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl -cultures:en-us C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj
[21:10:53.015] Output:
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(41) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\FileMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(56) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon$anon$anonfun$lessinit$greater.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(71) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\SettingsMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(111) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(116) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(151) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(206) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateNumericEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(221) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(226) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\landing\LandingPane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(236) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(256) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(271) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateEnumEventDialog$anon$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(301) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\TaskRunner$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(336) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(356) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(366) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateNumericEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(391) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\ViewMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(411) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateEnumEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(426) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\HelpMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(436) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\landing\LandingPane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(451) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(461) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\ViewMenu$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(476) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(531) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(546) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(556) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateEnumEventDialog$anon$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(561) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(596) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\GUI$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(601) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(631) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
.. more of the same ..
[21:10:53.019] Returned: 103
[21:10:53.020] java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi, -sice:ICE27, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl, -cultures:en-us, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj] in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull exited with 103 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:91)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.execute(WixPipeline.java:135)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.buildMsi(WixPipeline.java:99)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.buildMSI(WinMsiBundler.java:521)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:386)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:664)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:538)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:98)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
[21:10:53.512] jdk.jpackage.internal.PackagerException: java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi, -sice:ICE27, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl, -cultures:en-us, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj] in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull exited with 103 code
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:389)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:664)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:538)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:98)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi, -sice:ICE27, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl, -cultures:en-us, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj] in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull exited with 103 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:91)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.execute(WixPipeline.java:135)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.buildMsi(WixPipeline.java:99)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.buildMSI(WinMsiBundler.java:521)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:386)
... 4 more
Error: Process completed with exit code 1.
如问题 here 中所述,当应用程序名称与安装程序名称不同时,jpackage
在 Windows 上失败
如果我为 --name
指定与我为应用程序图像指定的参数相同的参数,它对我有用。
(与 app-image 命令的名称相同,但您可能想要更改名称)。
不幸的是,这是 windows
的 jpackage 本身的错误
jpackage
没有正确转义 WIX pre-processor.
的 class 文件名
参见:
https://github.com/wixtoolset/issues/issues/6734
openjdk 问题的错误跟踪器:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282351
我正在尝试打包我使用 jpackage 构建的 ScalaFx 应用程序并在 windows 上遇到问题(mac 和 linux 工作正常)。
我正在使用 sbt assembly
构建一个 fat jar,然后使用 jpackage
创建一个 .msi
但是我收到此错误:
$ jpackage --win-shortcut --name krystalbull --app-version 0.1 --type msi -i target/scala-2.13/ --main-class com.krystal.bull.gui.GUI --main-jar krystal-bull-assembly-0.1.jar --icon src/main/resources/icons/krystal_bull.ico --verbose
shell: C:\Program Files\PowerShell\pwsh.EXE -command ". '{0}'"
env:
pkg-assembly: krystal-bull-assembly-0.1.jar
pkg-name: krystalbull
pkg-version: 0.1
JAVA_HOME_16.0.1_x64: C:\hostedtoolcache\windows\jdk.0.1\x64
JAVA_HOME: C:\hostedtoolcache\windows\jdk.0.1\x64
JAVA_HOME_16_0_1_X64: C:\hostedtoolcache\windows\jdk.0.1\x64
[21:10:32.469] Running candle.exe
[21:10:32.541] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe
[21:10:34.005] Running light.exe
[21:10:34.024] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe
[21:10:35.848] Detected [light.exe] version [3.11.2.4516].
[21:10:35.848] Detected [candle.exe] version [3.11.2.4516].
[21:10:35.849] WiX 3.11.2.4516 detected. Enabling advanced cleanup action.
[21:10:46.540] Command:
jlink --output C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\runtime --module-path C:\hostedtoolcache\windows\jdk\16.0.1\x64\jmods --add-modules jdk.management.jfr,java.rmi,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,jdk.jsobject,java.sql.rowset,jdk.sctp,jdk.jlink,jdk.unsupported,java.smartcardio,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,java.sql,jdk.incubator.vector,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.crypto.mscapi,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.internal.jvmstat,jdk.incubator.foreign,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,jdk.jpackage,java.management.rmi,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
[21:10:46.540] Output:
WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
[21:10:46.544] Returned: 0
(loaded from file D:\a\krystal-bull\krystal-bull\src\main\resources\icons\krystal_bull.ico).
[21:10:46.560] Using default package resource WinLauncher.template [Template for creating executable properties file] (add krystalbull.properties to the resource-dir to customize).
[21:10:47.532] MSI ProductCode: c47093f7-318f-3c33-b6f9-e8a8c4adb014.
[21:10:47.533] MSI UpgradeCode: c62bde9b-3ba1-3197-8853-ba4770495959.
[21:10:47.536] Using default package resource main.wxs [Main WiX project file] (add main.wxs to the resource-dir to customize).
[21:10:47.537] Using default package resource overrides.wxi [Overrides WiX project file] (add overrides.wxi to the resource-dir to customize).
[21:10:47.540] Preparing MSI config: D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi.
[21:10:47.541] Generating MSI: D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi.
[21:10:47.552] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull
[21:10:50.004] Command:
C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -nologo C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\main.wxs -ext WixUtilExtension -arch x64 -out C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj -dJpAppDescription=krystalbull -dJpAppVersion=0.1 -dJpProductCode=c47093f7-318f-3c33-b6f9-e8a8c4adb014 -dJpAppName=krystalbull -dJpAllowUpgrades=yes -dJpProductUpgradeCode=c62bde9b-3ba1-3197-8853-ba4770495959 -dJpIsSystemWide=yes -dJpAllowDowngrades=yes -dJpIcon=C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\krystalbull.exe -dJpAppVendor=Unknown -dJpConfigDir=C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config
[21:10:50.004] Output:
main.wxs
[21:10:50.005] Returned: 0
[21:10:50.005] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull
[21:10:51.344] Command:
C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -nologo C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf -ext WixUtilExtension -arch x64 -out C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj
[21:10:51.344] Output:
bundle.wxf
[21:10:51.346] Returned: 0
[21:10:51.348] Running C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull
[21:10:53.013] Command:
C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe -nologo -spdb -ext WixUtilExtension -out D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi -sice:ICE27 -loc C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl -cultures:en-us C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj
[21:10:53.015] Output:
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(41) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\FileMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(56) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon$anon$anonfun$lessinit$greater.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(71) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\SettingsMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(111) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(116) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(151) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(206) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateNumericEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(221) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(226) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\landing\LandingPane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(236) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(256) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(271) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateEnumEventDialog$anon$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(301) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\TaskRunner$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(336) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(356) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(366) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateNumericEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(391) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\ViewMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(411) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateEnumEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(426) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\HelpMenu$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(436) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\landing\LandingPane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(451) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(461) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\ViewMenu$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(476) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(531) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(546) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\ViewEventDialog$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(556) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\dialog\CreateEnumEventDialog$anon$anon$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(561) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(596) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\GUI$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(601) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
C:\Users\runneradmin\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\bundle.wxf(631) : error LGHT0103 : The system cannot find the file 'C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull\app\classes\com\krystal\bull\gui\home\HomePane$anon.class'.
.. more of the same ..
[21:10:53.019] Returned: 103
[21:10:53.020] java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi, -sice:ICE27, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl, -cultures:en-us, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj] in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull exited with 103 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:91)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.execute(WixPipeline.java:135)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.buildMsi(WixPipeline.java:99)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.buildMSI(WinMsiBundler.java:521)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:386)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:664)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:538)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:98)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
[21:10:53.512] jdk.jpackage.internal.PackagerException: java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi, -sice:ICE27, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl, -cultures:en-us, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj] in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull exited with 103 code
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:389)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:664)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:538)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:98)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\krystal-bull\krystal-bull\krystalbull-0.1.msi, -sice:ICE27, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\config\MsiInstallerStrings_en.wxl, -cultures:en-us, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\wixobj\bundle.wixobj] in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.jpackage17983400798231933520\images\win-msi.image\krystalbull exited with 103 code
at jdk.jpackage/jdk.jpackage.internal.Executor.executeExpectSuccess(Executor.java:91)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.execute(WixPipeline.java:135)
at jdk.jpackage/jdk.jpackage.internal.WixPipeline.buildMsi(WixPipeline.java:99)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.buildMSI(WinMsiBundler.java:521)
at jdk.jpackage/jdk.jpackage.internal.WinMsiBundler.execute(WinMsiBundler.java:386)
... 4 more
Error: Process completed with exit code 1.
jpackage
在 Windows 上失败
如果我为 --name
指定与我为应用程序图像指定的参数相同的参数,它对我有用。
(与 app-image 命令的名称相同,但您可能想要更改名称)。
不幸的是,这是 windows
的 jpackage 本身的错误jpackage
没有正确转义 WIX pre-processor.
参见:
https://github.com/wixtoolset/issues/issues/6734
openjdk 问题的错误跟踪器:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8282351