我想使用javapackager
但面临的问题从java的jar应用程序为windows创建可执行包。
运行cmd命令
javapackager -deploy -native -outdir packages -outfile Final -srcdir . -srcfiles Hello.jar -appclass sample.Main
例外
No base JDK. Package will use system JRE.
No base JDK. Package will use system JRE.
Creating app bundle: Main in C:\Users\DELL\Desktop\Java Packager\packages\bundles
Result application bundle: C:\Users\DELL\Desktop\Java Packager\packages\bundles
java.io.IOException: Exec failed with code 2 command [[C:\Program Files (x86)\InnoSetup6\iscc.exe,
/oC:\Users\DELL\Desktop\Java Packager\packages\bundles,
C:\Users\DELL\AppData\Local\Temp\fxbundler6308867820319632690\images\win-exe.image\Main.iss] in
C:\Users\DELL\AppData\Local\Temp\fxbundler6308867820319632690\images\win-exe.image
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)
at com.oracle.tools.packager.windows.WinExeBundler.buildEXE(WinExeBundler.java:697)
at com.oracle.tools.packager.windows.WinExeBundler.bundle(WinExeBundler.java:366)
at com.oracle.tools.packager.windows.WinExeBundler.execute(WinExeBundler.java:173)
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
at com.sun.javafx.tools.packager.Main.main(Main.java:476)
Error: Bundler "EXE Installer" (exe) failed to produce a bundle.