JAVAFx构建失败

 mobiledu2502939777 发布于 2023-01-02 10:21

我使用JavaFx for windows创建了一个应用程序,这非常酷.我可以从e(fx)clipse运行它,everthing工作正常,但我无法从项目中创建一个jar文件.我可以导出它(右击 - >导出 - >可运行的Jar文件).但是,如果我在MAC OS X上运行jar,在菜单栏中我得到"java"menuitem而不是我的应用程序名称,我真的不喜欢.我搜索了如何隐藏该menuitem,或者只是重命名它,我发现我必须在build.fxbuild文件中重命名"Application title*".现在我无法建立它.

所以这就是我真正想要的:在Mac OS X中删除/隐藏/重命名"java"menuitem.如果您有任何经验,请与我分享.我将非常感激:).

我尝试运行build.xml文件时收到以下错误:

[javac] Compiling 22 source files to C:\Users\Hassan\Desktop\Programming\workspace\Raktar_vevo 2.7\build\classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] Note: C:\Users\Hassan\Desktop\Programming\workspace\Raktar_vevo 2.7\build\src\application\SajátKészlet.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
 [copy] Copying 12 files to C:\Users\Hassan\Desktop\Programming\workspace\Raktar_vevo 2.7\build\classesinit

    -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 20 files to C:\Users\Hassan\Desktop\Programming\workspace\Raktar_vevo 2.7\dist\libs

BUILD FAILED
C:\Users\Hassan\Desktop\Programming\workspace\Raktar_vevo 2.7\build.xml:217: 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


Total time: 22 seconds 

**我使用:-Windows 7 64bit -jdk 8 u5 -JAVA_HOME设置-e(fx)clipse(开普勒),我下载了一体机版本(用于懒人链接)

非常感谢你的帮助!

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有