加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

无法在WinXP 32位上为JavaFX应用程序构建本机包

发布时间:2020-12-13 20:59:50 所属栏目:Windows 来源:网络整理
导读:我正在为WinXP 32位系统构建一个JavaFX应用程序(本机包)。 我部署了一个WinXP 32位虚拟机。还安装了JDK(jdk-8u65-windows-i586)和InnoSetup和Netbeans 8.0.2 … 但是,当我试图打包为一个.EXE应用程序我收到: Exception: java.io.IOException: Cannot run p
我正在为WinXP 32位系统构建一个JavaFX应用程序(本机包)。

我部署了一个WinXP 32位虚拟机。还安装了JDK(jdk-8u65-windows-i586)和InnoSetup和Netbeans 8.0.2 …

但是,当我试图打包为一个.EXE应用程序我收到:

Exception: java.io.IOException: Cannot run program "C:DOCUME~1ADMINI~1LOCALS~1Tempiconswap2855415551655584734.exe": CreateProcess error=193,%1 is not a valid Win32 application
C:Documents and SettingsAdministratorMy DocumentsNetbeans ProjectsAffideaDicomRouterBasic1_0_0nbprojectjfx-impl.xml:3415: The following error occurred while executing this line:
C:Documents and SettingsAdministratorMy DocumentsNetbeans ProjectsAffideaDicomRouterBasic1_0_0nbprojectjfx-impl.xml:3438: The following error occurred while executing this line:
C:Documents and SettingsAdministratorMy DocumentsNetbeans ProjectsAffideaDicomRouterBasic1_0_0nbprojectjfx-impl.xml:1465: The following error occurred while executing this line:
C:Documents and SettingsAdministratorMy DocumentsNetbeans ProjectsAffideaDicomRouterBasic1_0_0nbprojectjfx-impl.xml:3093: The following error occurred while executing this line:
C:Documents and SettingsAdministratorMy DocumentsNetbeans ProjectsAffideaDicomRouterBasic1_0_0nbprojectjfx-impl.xml:2055: Error: Bundler "EXE Installer" (exe) failed to produce a bundle.
BUILD FAILED (total time: 35 seconds)

我的设置是否正常?我还缺什么吗

我以为为了为WinXP32构建一个JavaFX应用程序,我只应该:

>在类似的(WinXP32)机器上构建它
>使用X86 JDK版本

但这似乎还不够!

这个问题听起来像您正在尝试将jar存档(或所有.class文件)打包到一个exe存档中。
我的答案是基于这个假设,并尝试解释和扩展来自nextcard的答案。如果我误解了你的问题,我很抱歉对于我链接的格式不好,我很抱歉。我不允许发布多个链接。一旦我有十个声誉,我会更正。

Java不是编译语言。这意味着.class文件或jar存档不可执行。每个Java程序都需要使用通常称为java的JIT(即时编译器)启动。
如果您点击它们,系统就可以执行jar存档,因为它知道它必须在文件名之前添加“java -jar”才能做某事。

如果您希望将java程序作为系统依赖可执行文件,那么您必须使用AOT(Ahead of Time)编译器。那些产生真正的字节码的系统可以解释自己在java程序正常运行的虚拟机上的独立性。另一种可能性是用launch4j(已经由nextcard提到)

包装:

> launch4j

AOT编译:

> vmkit.llvm.org> gcc.gnu.org/java/> www.excelsiorjet.com

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读