title: JavaFX Ant build failed, JDK 10.0.2 Eclipse Photon
body: <p>I am trying to build a JavaFX application on Windows 10, Oracle JDK 10.0.2 and Eclipse Photon. The application works, also if I export it as an executable jar it works. For a proper build, I open the "FX Build Configuration", click on "Generate ant build.xml and run".
  The build fails with the following error:</p>
  
  <pre><code>init-fx-tasks:
      [taskdef] Could not load definitions from resource com/sun/javafx/tools/ant/antlib.xml. It could not be found.
  
  do-deploy:
  BUILD FAILED
  C:\Users\myname\eclipse-workspace\MyProgram\build\build.xml:90: 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 &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.
  No types or tasks have been defined in this namespace yet
  </code></pre>
  
  <p>Browsing the forum I understand the problem is related to the runtime/build environment. The automatically generated <code>build.xml</code> states</p>
  
  <pre><code>&lt;target name="init-fx-tasks"&gt;
  &lt;path id="fxant"&gt;
      &lt;filelist&gt;
          &lt;file name="${java.home}\..\lib\ant-javafx.jar"/&gt;
          &lt;file name="${java.home}\lib\jfxrt.jar"/&gt;
      &lt;/filelist&gt;
  &lt;/path&gt;
  &lt;taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
      uri="javafx:com.sun.javafx.tools.ant"
      classpathref="fxant"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>I installed Oracle JDK with intaller's default paths: <code>C:\Program Files\Java\jdk-10.0.2</code> and JRE as well <code>C:\Program Files\Java\jre-10.0.2</code>, but cannot find the <code>jfxrt.jar</code> required by <code>build.xml</code> in any place in the filesystem, while I can locate <code>C:\Program Files\Java\jdk-10.0.2\lib\ant-javafx.jar</code>.</p>
  
  <p>In Eclipse Photon, in <code>Run-&gt;External Tools-&gt;External Tools Configuration-&gt;JRE</code> the item "Separate JRE" is selected and set to "jdk-10.0.2". 
  Does anybody have clue of how to solve this?
  Many thanks</p>