Question

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.

Was it helpful?

Solution

exe4j or install4j may be a good option

OTHER TIPS

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.

Disclaimer: I work for Excelsior.

We've just discovered that Excelsior JET seems to already support JavaFX 2. You can compile your JavaFX app down to native code with it, as opposed to (launch|exe|install)4j that are only capable of creating EXE launchers and wrappers.

That said, a launcher/wrapper generator may be a better fit for your needs and budget.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top