Hello,
I'm having some trouble running my jar. It works perfectly fine in Intellij IDEA, but when running it from command line I get this error:
I have read that this might be an issue with Java 11. I'm currently running OpenJDK11. java -version returns this:
This is a Maven project. I have added these dependencies for JavaFX:
I run the command mvn clean install, and the build is successful
My VM options for Intellij are these:
Does anybody have any idea what might be causing this issue? Do I have to go back to Java 8 JDK?
I'm having some trouble running my jar. It works perfectly fine in Intellij IDEA, but when running it from command line I get this error:
Code
Error: Could not find or load main class com.myapp.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/ApplicationI have read that this might be an issue with Java 11. I'm currently running OpenJDK11. java -version returns this:
Code
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)This is a Maven project. I have added these dependencies for JavaFX:
Code
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11.0.2</version>
</dependency>My VM options for Intellij are these:
Code
--module-path "C:\path\to\javafx\javafx-sdk-11.0.2\lib" --add-modules=javafx.controls,javafx.graphics,javafx.fxmlDoes anybody have any idea what might be causing this issue? Do I have to go back to Java 8 JDK?



![[Image: wKo4TU0.gif]](https://i.imgur.com/wKo4TU0.gif)
