3

I want to create exe file from my javaFX project. I have exported my project into runable jar file to change it to exe with launch4j but when I run jar file with command promp it show "Error: JavaFX runtime components are missing, and are required to run this application"

when I exporting to .jar it finished with warnnings "duplicate entry: module-info.class" for multiple line.Is it the reason?

E_net4
  • 27,810
  • 13
  • 101
  • 139
  • Depends on your version, but after java 8 its not part of the jdk anymore. So now you have to use "java -jar --module-path "C:\path\javafx-sdk-11.0.2\lib" --add-modules=javafx.controls,javafx.fxml,javafx.swing your.jar" You need to give the path to the JavaFx lib folder and the modules you want to use. The duplicate entry may be because of the dependencies you are using. They may contain duplicated files with the same qualified name, check this answer https://stackoverflow.com/a/4378235/6708879 – MissingSemiColon Jul 28 '20 at 07:27
  • Does this post answer your question? https://stackoverflow.com/questions/10680679/how-to-make-a-executable-file-of-java-fx-2-0-project – toydarian Jul 28 '20 at 07:29
  • I have the same problem. I created my jar and when I run it shows the same error. – Eber Aug 11 '20 at 01:10

0 Answers0