运行build.xml时出错-无法从资源com / sun / javafx / tools / ant / antlib.xml加载定义

时间:2018-12-09 19:23:11

标签: java javafx build.xml antbuilder

我正在尝试在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>

这是我的目录结构:

enter image description here

关于如何解决此问题的任何想法?

0 个答案:

没有答案