title: JDK 11 and JavaFX 11: build for ARM (Tinker Board) not running (hash mismatch)
body: <p>I have a JavaFX 8 project which I develop on Windows 10 with NetBeans 8.2. The JAR I build from this I have running on an Asus Tinker Board.</p>
  
  <p>With JDK 11 and JavaFX 11 I want to take advantage of a few of the new features and hope for some performance gain. After installing NetBeans 10 and with the help of the tutorial: <a href="https://openjfx.io/openjfx-docs/#introduction" rel="nofollow noreferrer">https://openjfx.io/openjfx-docs/#introduction</a> (section JavaFX and NetBeans > Non-modular with Maven), I have successfully ported and can run the application on my Windows system.</p>
  
  <p>Either via the IDE or with the command prompt:
  java --module-path %PATH_TO_FX% --add-modules=javafx.c
  ontrols,javafx.fxml,javafx.graphics,javafx.media -jar Praatpaal2-2.0-jar-with-dependencies.jar</p>
  
  <p>Compared to JavaFX 8, the JavaFX modules are now added as modules.</p>
  
  <p>But when I do the same on the Asus Tinker Board (runnning Tinker OS (Debian)), I get the following error:</p>
  
  <blockquote>
    <p>Error occurred during initialization of boot layer
    java.lang.module.FindException: Hash of javafx.base
    (d87df23ee5c54c7ff062c4f8572bab8aaf6c1775854662008fccdb993957bcad)
    differs to expected hash
    (320c5b0ffaf22fec9daf0c3e364f6598631b333fa95015a0f055e1c1c597c05b)
    recorded in java.base</p>
  </blockquote>
  
  <p>There is very little information on this hash mismatch. My suspicion is that it either tries to load the Windows version of javafx.base.jar, or I use org.openjfx in the Maven pom.xml but refer to GluonHQ JavaFX on runtime, or there is something wrong with the modular setup I have.</p>
  
  <p>The dependencies and build part of the pom.xml look like this:</p>
  
  <pre><code>&lt;dependencies&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;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-graphics&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-media&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-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-graphics&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-media&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;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.samuelcampos&lt;/groupId&gt;
              &lt;artifactId&gt;usbdrivedetector&lt;/artifactId&gt;
              &lt;version&gt;2.0.4&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&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.0&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.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.6.0&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;java&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;mainClass&gt;nl.embeddedfitness.praatpaal2.Main&lt;/mainClass&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;archive&gt;
                              &lt;manifest&gt;
                                  &lt;mainClass&gt;
                                      nl.embeddedfitness.praatpaal2.Main
                                  &lt;/mainClass&gt;
                              &lt;/manifest&gt;
                              &lt;/archive&gt;
                              &lt;descriptorRefs&gt;
                                  &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                              &lt;/descriptorRefs&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  
  <p>I have tried the 4 JavaFX dependencies with and without classifier. But this makes no difference.
  The jar-with-dependencies builds the jar with all dependencies except the JavaFX ones which I add on runtime with the java command I mentioned earlier.</p>
  
  <p>For Java 11 I use:<br>
  <a href="https://bell-sw.com/pages/java-11.0.2" rel="nofollow noreferrer">https://bell-sw.com/pages/java-11.0.2</a><br>
  <strong>Microsoft Windows 64 bit</strong> for the Windows system<br>
  <strong>Linux ARMv7&amp;8 32 Bit HardFloat</strong> for the Asus Tinker Board</p>
  
  <p>For JavaFX 11 I use:<br>
  <a href="https://gluonhq.com/products/javafx/" rel="nofollow noreferrer">https://gluonhq.com/products/javafx/</a><br>
  <strong>JavaFX Windows SDK</strong> for the Windows system<br>
  <strong>JavaFX armv6hf SDK</strong> for the Asus Tinker Board</p>