我为 javafx 开发安装了 eclipse-SDK-4.2.1-win32-efx-0.8.0。我进行了 soe 测试,我想部署我的应用程序。我首先将它导出到 ant 并在我的项目中获取了这个 ant 文件
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. --><project basedir="." default="build" name="Newtest">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="../../"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<path id="JavaFX SDK.libraryclasspath">
<pathelement location="C:/Program Files/Java/jre7/lib/jfxrt.jar"/>
</path>
<path id="Newtest.classpath">
<pathelement location="bin"/>
<path refid="JavaFX SDK.libraryclasspath"/>
<pathelement location="lib/jfxtras-labs-2.2-r4.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="Newtest.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
<copy todir="${ant.library.dir}">
<fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
</copy>
<unzip dest="${ant.library.dir}">
<patternset includes="jdtCompilerAdapter.jar"/>
<fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
</unzip>
</target>
<target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<antcall target="build"/>
</target>
<target name="Test">
<java classname="app.TEst" failonerror="true" fork="yes">
<classpath refid="Newtest.classpath"/>
</java>
</target>
</project>
并单击“生成 ant build.xml 并运行”我在控制台上出现此错误:
Buildfile: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build.xml
setup-staging-area:
[delete] Deleting directory D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\externalLibs
[delete] Deleting directory D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\project
[delete] Deleting directory D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\projectRefs
[mkdir] Created dir: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\externalLibs
[copy] Copying 1 file to D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\externalLibs
[mkdir] Created dir: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\project
[copy] Copying 2 files to D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\project
[mkdir] Created dir: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\projectRefs
do-compile:
[delete] Deleting directory D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build
[mkdir] Created dir: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build\src
[mkdir] Created dir: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build\libs
[mkdir] Created dir: D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build\classes
[copy] Copying 1 file to D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build\libs
[copy] Copying 2 files to D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build\src
[javac] Compiling 2 source files to D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build\classes
init-fx-tasks:
[taskdef] Could not load definitions from resource com/sun/javafx/tools/ant/antlib.xml. It could not be found.
do-deploy:
[copy] Copying 1 file to D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\dist\libs
BUILD FAILED
D:\eclipse-SDK-4.2.1-win32-efx-0.8.0\eclipse\MyWorkPlace\Newtest\build\build.xml:93: Problem: failed to create task or type javafx:com.sun.javafx.tools.ant:resources
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet
Total time: 14 seconds
我对蚂蚁一无所知,请问我的问题是什么?谢谢