简体   繁体   English

Ant 任务定义 OpenJDK 11 JavaFX SDK 11 Eclipse 2018-12

[英]Ant tasks definitions OpenJDK 11 JavaFX SDK 11 Eclipse 2018-12

I am trying to build a JavaFX application using Ant in Eclipse 2018-12.我正在尝试在 Eclipse 2018-12 中使用 Ant 构建 JavaFX 应用程序。 To do this, Ant tasks definitions are required, see point 10.3 at https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/javafx_ant_tasks.html .为此,需要 Ant 任务定义,请参阅https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/javafx_ant_tasks.html上的第 10.3 点。 Before updating to OpenJDK 11 and OpenJFX 11 the definitions where loaded from antlib.xml and ant-javafx.jar .Now these two files are no longer available, and jfxrt.jar as well.在更新到 OpenJDK 11 和 OpenJFX 11 之前,定义从 antlib.xml 和 ant-javafx.jar 加载。现在这两个文件不再可用,jfxrt.jar 也是如此。 does somebody know what shall I do?有人知道我该怎么办吗?

Here are the relevant rows of build.xml that was working previusly:以下是以前工作的 build.xml 的相关行:

<project name="myProj" default="do-deploy" xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="init-fx-tasks">
    <path id="fxant">
        <filelist>
            <file name="${java.home}\..\lib\ant-javafx.jar"/>
            <file name="${java.home}\lib\jfxrt.jar"/>
        </filelist>
    </path>

    <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
        uri="javafx:com.sun.javafx.tools.ant"
        classpathref="fxant"/>
</target>

To address these requirements previously, a packaging tool called javapackager was distributed with Oracle's JDK 8. However, it was removed from Oracle's JDK 11 as part of the removal of JavaFX.以前,为了满足这些要求,Oracle 的 JDK 8 随附了一个名为 javapackager 的打包工具。但是,作为 JavaFX 删除的一部分,它已从 Oracle 的 JDK 11 中删除。

The packager was removed from Java 11. See JEP 343: Packaging Tool打包程序已从 Java 11 中删除。请参阅JEP 343:打包工具

It seems this is the only way for Java 11+.似乎这是 Java 11+ 的唯一方法。 How to deploy a JavaFX 11 Desktop application with a JRE 如何使用 JRE 部署 JavaFX 11 桌面应用程序

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

相关问题 JDK11迁移:Eclipse 2018-12中显示了编译错误,但是代码运行正常 - JDK11 Migration: Compilation error shown in Eclipse 2018-12 but code runs fine 为什么 Eclipse 2018-12 在 JDK-11 中显示“未找到 JRE”? - Why Eclipse 2018-12 says "No JREs found" in JDK-11? 导出的可运行 jar 不包含来自 eclipse 2018-12 和 java 11 的依赖 jar。我们如何解决这个问题? - exported runnable jar doesn't contain dependency jars from eclipse 2018-12 with java 11. How do we solve this? Eclipse 2018-09在Windows 10上使用OpenJDK 11 - Eclipse 2018-09 with OpenJDK 11 on Windows 10 通过Maven的OpenJDK 11 + OpenJFX 11无法在Eclipse 2018-09 + Java 11修补程序中运行 - OpenJDK 11 + OpenJFX 11 via maven fails to run inside Eclipse 2018-09 + Java 11 Patch 无法将Codemix插件安装到Eclipse 2018-12 - can't install codemix plugin to eclipse 2018-12 版本 2018-12 (4.10.0) 中的 Eclipse 调试器不起作用 - Eclipse Debugger in version 2018-12 (4.10.0) not working @Before 和 @After 不能在 Eclipse 2018-12 JAVA 上使用 JUnit 5 - @Before and @After not working with JUnit 5 on Eclipse 2018-12 JAVA InjectionException-Eclipse 2018-12 e4导出 - InjectionException - Eclipse 2018-12 e4 export 错误:缺少 JavaFX 运行时组件 - JavaFX 11 和 OpenJDK 11 以及 Eclipse IDE - Error: JavaFX runtime components are missing - JavaFX 11 and OpenJDK 11 and Eclipse IDE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM