I have created a JavaFX application in order to register data on my personal computer (Windows 10) and I am looking for launching it by double clicking on its JAR.
thank you in advance for your help.
Vinz
I have created a JavaFX application in order to register data on my personal computer (Windows 10) and I am looking for launching it by double clicking on its JAR.
thank you in advance for your help.
Vinz
well i had the same problem after i was taught to use JAVAFX a week ago we had to use command line but that led to an idea
java -jar --module-path "C:\Program Files\Java\javafx-sdk-11.0.2\lib" --add-modules javafx.controls,javafx.fxml yourjarfile.jar
type above in notepad and save it as a batch file (.cmd) launch the batch file
or shall i say double click!!!
I would suggest using a launcher. It would give you many options like minimum and maximum supported JRE versions, heap size, and error messages' alerts. Take a look at Launch4j.
This is all not the way it is done today. Just use jpackage, which comes with JDK 14, and build a real application or installer with it. Then you can not only double click to launch your application, you will also benefit from all the other goodies like icons, install/uninstall, desktop integration, ... Have a look here to see how it works: https://github.com/dlemmermann/JPackageScriptFX