-3

I have a JavaFX project running perfectly with no exceptions on eclipse IDE. I'm trying to export it into a runnable jar, and then an executable. However, after exporting it into a runnable jar I get multiple exceptions when I run it. These exceptions don't appear when I run the app inside eclipse. They only show up when I run the jar (via command prompt). Here are the exceptions:enter image description here

enter image description here

And here are my project files as well as the VM arguments used.

enter image description here

  • 1
    You need to replicate those VM arguments when you run it from the command line. – James_D Jun 14 '21 at 11:48
  • 3
    no screenshots of text please .. – kleopatra Jun 14 '21 at 11:51
  • Click on _Show Command Line_ button (in _Run Configurations_ window) and Eclipse will display another window containing the text of the command that Eclipse uses in order to run your application. Then read about [JAR](https://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html) files in order to understand how to convert the command that Eclipse uses to a command that can launch your JAR. – Abra Jun 14 '21 at 12:24
  • 1
    Images of text are very hard to read, cannot be searched, cannot be copied, and cannot be understood by sight impaired users. Please edit your question and paste the stack trace as text, not as an image. – VGR Jun 14 '21 at 13:51

1 Answers1

0

you need to add classpath you need java 15 in cmd use this in your cmd

java --module-path "<path of your javafx lib" --add-modules ";javafx.fxml,javafx.controls" -jar jarfile.jar