user3649361 February 2016

Converting JavaFx project to .exe and .app in Netbeans

I am developing a desktop app in JavaFx for mac and windows and want to distribute it to users but not as a .jar file. I want to distribute it as an installer file for both mac and windows.

I have read at some forums and in stackoverflow also that we can export a project a .exe for windows and .app for mac using Neatbeans but I am not able to find how to do it.

Is it possible through netbeans to create .exe and .app files ??

I have neatbeans 8. I can see some ways to convert it to .exe using some apps, but for .app or .dmg I am not able to find anything.

Answers


Rupesh February 2016

There are tools available jartoexe etc..Please refer a similar discussion

[Compiling a java program into an executable

Also you can create a batch file while will execute your jar. soemthing like this

java -jar "myApp.jar" 


user3649361 February 2016

Answering my own question. Just figured out a solution for it.

Neatbeans 7.4 are providing option of native packaging to package java project in .exe and .app format.

For that we have to just need to enable native packaging. in Netbeans, right-click your project, go to 'Properties', then go to Build/Deployment and select 'Enable Native Packaging'. Then you'll be able to right-click the project again, and choose 'Package as', and choose 'Image only', it will create an .app file in the project location. select exe installer to create .exe file.

Post Status

Asked in February 2016
Viewed 3,055 times
Voted 9
Answered 2 times

Search




Leave an answer