JavaFX部署问题 [英] JavaFX Deployment Issue

查看:471
本文介绍了JavaFX部署问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Netbeans 8.0.2 Windows 8.1 64位上使用 4GB RAM 开发 JavaFX 8 应用程序正在运行 JDK版本8u25 64位

I am developing JavaFX 8 application on Windows 8.1 64bit with 4GB RAM using Netbeans 8.0.2 Which is running with JDK version 8u25 64bit.

应用程序平台 JDK版本8u25 32位,问题出在何时我构建了应用程序正常运行的项目,但是当我进行本机打包时,我可以运送32位JRE以及exe文件,以便应用程序netbeans输出此消息并跳过构建本机程序包:

The Application Platform is JDK version 8u25 32bit , the problem is when I build the project the application runs normally but when I do native packaging so I can ship 32 bit JRE along with exe file for the application netbeans outputs this message and skip building native package :

由于配置问题而跳过了Bundler Windows应用程序映像:FX SDK和JRE运行时之间的位体系结构不匹配。

修复建议:确保使用正确的位体系结构的JRE运行时。

这是项目Build.xml文件中的My Target标记:

This is My Target tag from Build.xml file of the project :

<target name="-post-jfx-deploy">
<fx:deploy width="${javafx.run.width}" height="${javafx.run.height}"
       nativeBundles="image"
       outdir="${basedir}/${dist.dir}" outfile="${application.title}">
    <fx:platform basedir="${java.home}"/>  
    <fx:platform basedir="C:\Program Files (x86)\Java\jdk1.8.0_25\jre"/> 
    <fx:application name="${application.title}" mainClass="${javafx.main.class}"/>
    <fx:resources>
        <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>
    </fx:resources>
    <fx:info title="${application.title}" vendor="${application.vendor}"/>
</fx:deploy>

所以我的问题是为什么Netbeans从项目平台错配FX SDK版本?虽然我在项目设置中指定使用32位JDK并且在build.xml文件中也指定了如何使用 32位JRE发送应用程序

So my qusestion is why Netbeans mismatches FX SDK version from the project Platform ? Although I have specified in the project settings to use 32 bit JDK and in the build.xml file also and How to ship the application with the 32 bit JRE?.

推荐答案

我终于找到了解决方案,以便在 64位上对JavaFX 8应用程序进行本机 32位打包视窗。您必须将Netbeans默认平台更改为 32位(x86)JDK ,以解决我执行以下操作的问题: -

I finally found the solution in order to make native 32 bit packaging of JavaFX 8 application on 64 bit Windows. You have to change Netbeans Default Platform to 32 Bit (x86) JDK so to solve the problem I did the following :-


  1. 以管理员身份启动Notepad ++。

  1. Launched Notepad++ as administrator.

已打开 C:\Program Files\NetBeans 8.0.2 \\ \\ netc\\\
etbeans.conf

已更改(我已将JDK从8u25更新为8u40 )

Changed (I have updated my JDK from 8u25 to 8u40)

netbeans_jdkhome =C:\Program Files\Java\jdk1.8.0_40

netbeans_jdkhome =C:\Program文件(x86)\ Java \ jdk1.8.0_40

已更改项目平台默认平台将netbeans默认平台和已更改平台标记与 build.xml 匹配到

Changed Project Platform to default platform to match netbeans default platform and Changed platform tag in build.xml to

< fx:platform basedir =C:\Program Files(x86)\ Java \ _jdk1.8.0_40 \ jre/>

并且Netbeans像魅力一样做原生包装

这篇关于JavaFX部署问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆