1

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.

user3649361
  • 944
  • 4
  • 20
  • 40

2 Answers2

2

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.

user3649361
  • 944
  • 4
  • 20
  • 40
0

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" 
Community
  • 1
  • 1
Rupesh
  • 378
  • 7
  • 21