title: JavaFx : create jar under linux and run it under windows 10
body: <p>I have a simple Java FX(11.x LTS) application developed under Linux. I want to create a jar file to be executed under win 10. For this I have the following pom.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;groupId&lt;/groupId&gt;
      &lt;artifactId&gt;udp_dumper&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.3&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;transformers&gt;
                                  &lt;transformer
                                          implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                                      &lt;mainClass&gt;Launcher&lt;/mainClass&gt;
                                  &lt;/transformer&gt;
                              &lt;/transformers&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.8.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;release&gt;11&lt;/release&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
                  &lt;artifactId&gt;javafx-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.0.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;mainClass&gt;Launcher&lt;/mainClass&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-fxml&lt;/artifactId&gt;
              &lt;version&gt;11.0.2&lt;/version&gt;
              &lt;classifier&gt;linux&lt;/classifier&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-fxml&lt;/artifactId&gt;
              &lt;version&gt;11.0.2&lt;/version&gt;
              &lt;classifier&gt;win&lt;/classifier&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-controls&lt;/artifactId&gt;
              &lt;version&gt;11.0.2&lt;/version&gt;
              &lt;classifier&gt;linux&lt;/classifier&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-controls&lt;/artifactId&gt;
              &lt;version&gt;11.0.2&lt;/version&gt;
              &lt;classifier&gt;win&lt;/classifier&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>On Windows I've downloaded JavaFX SDk and put its path to PATH variable( both bin and lib folders ). I'm trying to execute it via <code>java -jar *.jar</code>
  But I get the following error :</p>
  
  <pre><code>java.lang.ClassNotFoundException: com.sun.glass.ui.win.WinPlatformFactory
  </code></pre>
  
  <p>What is the reason for the failure? 
  Do I use a valid approach to deploy JavaFX app?</p>