我正在使用Windows系统上的netbeans_8 ide开发JavaFX Desktop应用程序。但我无法创建能够在mac os上运行的部署包装。我有共享build.xml。我能够生成Demo.app文件但是在尝试运行mac时。它显示错误,如#34;无法加载java运行时环境。
<?xml version="1.0" encoding="UTF-8"?>
<project name="Demo" default="default" basedir="."xmlns:fx="javafx:com.sun.javafx.tools.ant">
<description>Builds, tests, and runs the project </description>
<import file="nbproject/build-impl.xml"/>
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath=".:path/to/sdk/lib/ant-javafx.jar"/>
<target name="-post-jfx-deploy" >
<fx:deploy width="${javafx.run.width}" height="${javafx.run.height}"
nativeBundles="all" verbose="true"
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="Demo.jar"/>
</fx:resources>
<fx:info title="${application.title}"
vendor="${application.vendor}"/>
</fx:deploy>
</target>
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />
<target name="bundle-demo">
<bundleapp outputdirectory="dist"
name="Demo"
displayname="DemoSyncApp"
identifier="com.demo.DemoApp"
mainclassname="com.demo.DemoApp">
<classpath file="dist/Demo.jar" />
</bundleapp>
</target>
</project>`
感谢先进。