title: How to package a javafx11/jdk11 application using NetBeans 10
body: <p>I am trying to package a javafx application using javafx11, jdk11 in NetBeans 10 after a while away from the java world. Since Javafx was put out of the standard jdk and NetBeans is still being incubated at Apache, things are a bit rougher than they used to be.</p>
  
  <p>Luckily I found <a href="https://openjfx.io/openjfx-docs/" rel="nofollow noreferrer">this great tutorial</a> and <a href="https://stackoverflow.com/questions/51987518/javafx-deployment-library-not-found-in-active-jdk">this great answer</a> which allowed me to run a simple Hello World application from inside NetBeans. </p>
  
  <p>But I can't make it work outside of the IDE : when invoked with the outputed jar, the jre gives the following error :</p>
  
  <pre><code>java.lang.NoClassDefFoundError: javafx/application/Application
  </code></pre>
  
  <p>So I guess I need to package a javafx runtime in the jar to be able to run it but I can't figure how to do it. </p>
  
  <p>I found some pointers but they all use command lines to point to the javafx sdk, but I am not targeting machines with this sdk installed on them and would like to package everything needed (except the jre itself) in the jar.</p>
  
  <p>Any help much appreciated.</p>