How do I get Java FX running with OpenJDK 8 on Ubuntu 18.04.2 LTS? : <p>When trying to compile an JavaFX application in the environment:</p>

<pre><code>java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
</code></pre>

<p>I get the error-message:</p>

<pre><code>cannot access javafx.event.EventHandler
[ERROR]   class file for javafx.event.EventHandler not found
</code></pre>

<p>I tried to find a solution by following these links:</p>

<ul>
<li><a href="https://stackoverflow.com/questions/50510033/how-to-add-javafx-dependencies-in-maven-with-java-10/50511752">how to add javafx dependencies in maven with java 10</a></li>
<li><a href="https://mvnrepository.com/artifact/org.openjfx/javafx/11" rel="noreferrer">https://mvnrepository.com/artifact/org.openjfx/javafx/11</a></li>
<li><a href="https://stackoverflow.com/questions/15278215/maven-project-with-javafx-with-jar-file-in-lib">Maven project with JavaFX (with jar file in `lib`)</a></li>
<li><a href="https://github.com/javafx-maven-plugin/javafx-maven-plugin" rel="noreferrer">https://github.com/javafx-maven-plugin/javafx-maven-plugin</a></li>
<li><a href="https://askubuntu.com/questions/1091157/javafx-missing-ubuntu-18-04">https://askubuntu.com/questions/1091157/javafx-missing-ubuntu-18-04</a></li>
<li><a href="https://unix.stackexchange.com/questions/505628/add-openjfx-class-path-in-debian-for-java11">https://unix.stackexchange.com/questions/505628/add-openjfx-class-path-in-debian-for-java11</a></li>
<li><a href="https://askubuntu.com/questions/609951/javafx-is-not-on-the-default-classpath-even-with-oracle-jdk-1-8">https://askubuntu.com/questions/609951/javafx-is-not-on-the-default-classpath-even-with-oracle-jdk-1-8</a></li>
<li><a href="https://stackoverflow.com/questions/34243982/why-is-javafx-is-not-included-in-openjdk-8-on-ubuntu-wily-15-10/34244308#34244308">Why is JavaFX is not included in OpenJDK 8 on Ubuntu Wily (15.10)?</a></li>
<li><a href="http://can4eve.bitplan.com/index.php/JavaFX" rel="noreferrer">http://can4eve.bitplan.com/index.php/JavaFX</a></li>
</ul>

<p>The most promising actions where to </p>

<ol>
<li>install openjfx with apt install openjfx</li>
<li>set the JAVA_HOME environment variable to /usr/lib/jvm/java-8-openjdk-amd64</li>
</ol>

<p>But the error persists.</p>

<p><strong>What needs to be done to get OpenJDK 8 and JavaFX working on Ubuntu 18.04.2 LTS?</strong></p>
