Reputation: 169
I am trying to build a JavaFX application using Ant in Eclipse 2018-12. 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 . 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. does somebody know what shall I do?
Here are the relevant rows of build.xml that was working previusly:
<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>
Upvotes: 2
Views: 2954
Reputation: 423
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.
The packager was removed from Java 11. See JEP 343: Packaging Tool
It seems this is the only way for Java 11+. How to deploy a JavaFX 11 Desktop application with a JRE
Upvotes: 1