我正在尝试在Eclipse中为我的JavaFX应用运行build.xml
文件,但出现此错误:
[copy] Copying 15 files to /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/build/build/src
[javac] Compiling 12 source files to /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/build/build/classes
[copy] Copying 3 files to /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/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 77 files to /Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/build/dist/libs
BUILD FAILED
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/build/build.xml:577: 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
build.xml
中的代码部分是指:
<fx:resources id="appRes">
<fx:fileset dir="dist" includes="CheckMyDigitalFootprint.jar"/>
<fx:fileset dir="dist" includes="libs/*"/>
</fx:resources>
这是我的目录结构:
关于如何解决此问题的任何想法?