开发者社区> 问答> 正文

JavaFX 部署 运行出错?报错

刚学JavaFX 跟着教程 一步一步往下做, 到部署的时候
右键bulid.xml文件, Run as ==> Ant build 报错

谁知道可能是什么原因吗?

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 3 files to D:\MyWork\git\git-demo\pack_fx\build\dist\libs

BUILD FAILED
D:\MyWork\git\git-demo\pack_fx\build\build.xml:116: 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 / declarations have taken place.
No types or tasks have been defined in this namespace yet


展开
收起
爱吃鱼的程序员 2020-06-09 16:38:43 678 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    方式太老了吧,javafx和java普通程序没什么区别了,怎么还用build.xml

    或者用gradle吧 https://github.com/jfoenixadmin/JFoenix


    用maven吧,

    在哪找的那么老的教程,ant都用上了


    我也遇到这个问题了 楼主解决了吗求指教这是老早的问题了,解决了的,当时好像就是在那个xml文件里做了修改,具体怎么改的忘记了.我好久不用JavaFX了
    2020-06-09 16:39:01
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载