Closed ghost closed 4 years ago
mvn install
does not bundle the JavaFX dependencies with in your jar. You have use mvn javafx:jlink
to create a custom runtime, or if your project is not modular use the shade maven plugin. All is documented here: https://openjfx.io/openjfx-docs/#modular
When i use maven and i do "mvn clean install" i can't run the jar file with "java -jar.jar"
Java version
openjdk version "12.0.2" 2019-07-16 OpenJDK Runtime Environment (build 12.0.2+10) OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
command: "java -jar.jar"
error: "no main manifest attribute, in .jar"
when doing that using this plugin in maven `
` it gives me this error "Error: Could not find or load main class nl.joshaprior.App Caused by: java.lang.NoClassDefFoundError: javafx/application/Application"
when i google that issue and follow all the things i still get the same error
and when using a Start class that calls App.launch() (because i red somewhere that its because of that extends) it gives me this error