I have created a desktop application using javafx. It uses the database of mysql. And by using Netbeans I packaged the application into running jar.
Now I want to distribute the application as a exe file for the windows users. Now my problem is how to create exe file from the jar and how that exe will connect with the database.
exe4j or install4j may be a good option
There is an official Java Packager Tool which is part of the JavaFX suite. It can create self-contained applications including a native launcher:
.exe on Windows,
.app bundle on OS X, etc. By default it bundles a JRE as part of the application, but this behavior can be changed to use the system JRE instead if desired.
You can call the Java packager via Ant tasks, the
javapackager command line tool, or using the NetBeans IDE. See the Java deployment guide for details.