简体   繁体   English

在 Eclipse 中设置 JavaFX 自包含构建时遇到问题

[英]Trouble setting up a JavaFX self-contained build in Eclipse

I am trying to set up a project in Eclipse for a self-contained Java (jdk 13.0.1) and JavaFX (javafx sdk 13.0.1) application.我正在尝试在 Eclipse 中为独立的 Java (jdk 13.0.1) 和 JavaFX (javafx sdk 13.0.1) 应用程序设置一个项目。 I am using the latest Eclipse with the E(fx)clipse plugin.我正在使用带有 E(fx)clipse 插件的最新 Eclipse。 I will eventually add some extra libraries and the the actual code but I'm just working on getting a test build to work and running into some issues.我最终会添加一些额外的库和实际代码,但我只是在努力让测试构建工作并遇到一些问题。 I've tried a lot of the suggestions I've found here but none seem to be working.我已经尝试了很多在这里找到的建议,但似乎都没有奏效。 The current setup shows the jdk in the build path and the user library I created from the javafx jdk jars with no errors or warnings in the project.当前设置显示了构建路径中的 jdk 和我从 javafx jdk jar 创建的用户库,项目中没有错误或警告。

I'm open to suggestions for better ways to accomplish this as well, I'm mostly looking for a way to easily put together an application with a higher version of Java that the user may not have and I will be using JavaFX for the GUI.我也愿意接受更好的方法来实现这一点的建议,我主要是在寻找一种方法来轻松地将应用程序与用户可能没有的更高版本的 Java 组合在一起,我将使用 JavaFX 作为 GUI .

The errors I'm getting when I use the "Generate and build.xml and run" option are:使用“Generate and build.xml and run”选项时遇到的错误是:

[javac] 1 warning
init-fx-tasks:
[taskdef] Could not load definitions from resource com/sun/javafx/tools/ant/antlib.xml. It could not be found.
BUILD FAILED
C:\Users\user\eclipse-workspace\Test\build\build.xml:132: 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

See: Ant tasks definitions OpenJDK 11 JavaFX SDK 11 Eclipse 2018-12请参阅: Ant 任务定义 OpenJDK 11 JavaFX SDK 11 Eclipse 2018-12

The old packager has been removed in Java11.旧的打包程序已在 Java11 中删除。 There is now a new packager coming with Java 14. It is already available as an EA release. Java 14 现在有一个新的打包程序。它已经作为 EA 版本提供。 Have a look here to see how it can be used: https://github.com/dlemmermann/JPackageScriptFX看看这里,看看它是如何使用的: https : //github.com/dlemmermann/JPackageScriptFX

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Eclipse中创建JavaFX自包含应用程序(使用自定义JDK) - Create JavaFX self-contained application (with custom JDK) in Eclipse 自包含JavaFX应用程序中的包含图标 - Include icon in Self-Contained JavaFX application JavaFX自包含的应用程序缺少密码加密服务吗? - JavaFX self-contained apps are missing the Cipher cryptographic service? JavaFX:将参数传递给自包含应用程序不起作用 - JavaFX: passing Arguments to a Self-Contained Application does not work 独立的jar文件 - Self-contained jar File 如何将动态JVM命令行标志传递给自包含的JavaFX应用程序? - How can dynamic JVM command line flags be passed to a self-contained JavaFX application? 部署 JavaFX 应用程序、创建 JAR 和自包含应用程序以及本机安装程序的最佳方式是什么 - What is the best way to deploy JavaFX application, create JAR and self-contained applications and native installers 如何在不使用 Maven/Gradle/IDE 的情况下部署自包含的 JavaFX 应用程序? - How to deploy a self-contained JavaFX application without using Maven/Gradle/IDEs? 如何使用捆绑在JavaFX 2自包含应用程序中的JRE在Mac OS X上启动可运行的JAR? - How to use the JRE bundled in a JavaFX 2 self-contained application to start a runnable JAR on Mac OS X? 自包含的Javafx应用程序无法在ubuntu中运行:GLIBCXX_3.4.21的问题 - self-contained javafx application fail to run in ubuntu : issue with GLIBCXX_3.4.21
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM