使用WiX打包Java应用程序

2025-10-28 13:50:21

1、首先右击项目名,选中属性,弹出项目属性对话框;然后选择部署,勾选在项目菜单中启用本机打包操作

使用WiX打包Java应用程序

2、此时再右击项目名,打包菜单已经显示出来,我们选中MSI安装程序点击,一般情况下我们可以在项目文件夹根目录的dist/bundles中找到我们想要的安装文件。如果提示“JavaFX native packager requires external WiX 3.0+ tools installed and included on PATH to create MSI installer. ”,先检查下计算机中是否安装了WiX 3.0+,如果没有,请百度WiX进行下载安装。

使用WiX打包Java应用程序

3、安装完成之后,再重复第2步的操作。结果又提示错误,“

Detected JavaFX Ant API version 1.2

{项目主目录}\nbproject\build-native.xml:442: Error:

JavaFX native packager requires external WiX 3.0+ tools installed and included on PATH to create MSI installer. 

使用WiX打包Java应用程序

4、我们找到这个build-native.xml文件并打开,将我红框中选中的文本内容<contains string="${exec-output}" substring="Windows Installer Xml Compiler version"/>修改为<contains string="${exec-output}" substring="Windows Installer Xml" casesensitive="false"/>即可,再重复第二步,这下终于可以了啊。

使用WiX打包Java应用程序

使用WiX打包Java应用程序

5、测试一下,果然好使了

使用WiX打包Java应用程序

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢