Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I wanted to know if there was a way to convert the existing Netbeans projects into an installable .exe file so that it can be installed and used standalone?

If so, how?

I program using Java.

share|improve this question
2  
Not easily. What you want is most likely an installer which can install it, as EXE-files are not very Javaish. – user1249 Sep 4 '12 at 21:14
@ThorbjørnRavnAndersen Can you suggest any such installers? – Pawan Sep 4 '12 at 21:16
2  
NetBeans currently supports programming in Java, JavaScript, PHP, Groovy, C, C++, Scala, Clojure, and it used to support Python and Ruby up until recently. In some of these languages your question doesn't make any sense, and in others the process will be entirely different. How about you tell us what language you are programming with? – Yannis Rizos Sep 4 '12 at 21:17
@YannisRizos Java only. Is that going to be a problem? – Pawan Sep 4 '12 at 21:20

3 Answers

up vote 1 down vote accepted

You can use external tools like NSIS (Nullsoft Scriptable Install System).

As an alternative, you can create and maintain a Izpack installer :

share|improve this answer
thanks, as much as I can gather suggests that there is no easy way to generate an exe file. Would you recommend NSIS or Izpack? – Pawan Sep 4 '12 at 21:19

There are several people having this exact same question on stackoverflow:

http://stackoverflow.com/questions/516399/how-do-i-create-an-exe-for-a-java-program http://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file http://stackoverflow.com/questions/2011664/compiling-a-java-program-into-an-exe

Personally, I have used Jsmooth and Launch4j. They both worked okay, but not without a lot of fiddling, and when I went to show other people what to do, the same configurations would mysteriously stop working. You can set it up to include a JVM so they don't require Java, but if you do, the size of the .exe will be much much larger.

share|improve this answer

Are you talking about the artifact that is produced - your Jar file ? If so take a look at http://izpack.org ; If all you are looking at is getting your application shipped to your customer as a installable bundle, izpack should do the trick.

Making an exe out of your executable is not the recommended way to solve this.

share|improve this answer
okay. Installable bundle was what I was looking for actually. Why is exe not recommended? – Pawan Sep 4 '12 at 21:22
2  
An exe is windows specific executable binary. Windows is just one of the platform that Java supports. There are other platforms that Java runs on - like Linux, Solaris and Unices. When you commit yourself to creating a exe you are limiting yourself to just one platform, where the same code could've been run on a Linux/ Unix machine. Why would you want to limit yourself ? – JVXR Sep 4 '12 at 22:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.