首页 > 解决方案 > 元素“fx:deploy”的前缀“fx”未绑定

问题描述

我正在尝试在 Java NetBeans 中制作我的应用程序的 EXE 包但是,当我单击 Clean and Build ... 时,此消息出现在 build.xml 中。如何解决?

<project name="bra" default="default" basedir=".">
<description>Builds, tests, and runs the project bra.</description>
<import file="nbproject/build-impl.xml"/>
<target name="-post-jfx-deploy">
    <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" 
       nativeBundles="all"
       outdir="${basedir}/${dist.dir}" outfile="${application.title}">

        <fx:application name="${application.title}" 
              mainClass="${javafx.main.class}"/>
        <fx:resources>
            <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>
            <fx:fileset dir="dist" includes="lib/*.jar"/>
        </fx:resources>
        <fx:info title="${application.title}"  vendor="${application.vendor}"/>
    </fx:deploy>          
 </target>
 </project>

标签: javanetbeansexe

解决方案


终于完成了..!!只需编辑这一行:

<project name="bra" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">

定义fx命名空间


推荐阅读