Question

Possible Duplicate:
How can I convert my java program to an .exe file ?

I've used JSmoothGen in the past, but recently we've seen a number of machines that refuse to run the .exes that it generates. It also seems not to be actively maintained so heavily any more.

Are there any alternatives that are more actively maintained and more reliable?

Was it helpful?

Solution

I use Launch4J which supports Windows, Mac and Linux. I suggest forgoing the somewhat flaky GUI tool and just writing the (short, readable) config file yourself.

OTHER TIPS

The gnu compiler gcj

I found this article to be very informative http://www.excelsior-usa.com/articles/java-to-exe.html.

Someone already mentioned Launch4j, however, I found Jsmooth to be alittle better. They are both very similar, but I would mess with both to see which you prefer.

EDIT: Sorry, I somehow skimmed over your mention of Jsmooth in your question. If Jsmooth isn't working for you, then I would go for Launch4j. I still recommend that article.

It is also not entirely necessary to make an .exe. On Windows, at least, .jar files are executable so long as there is a Java runtime installed and the .jar extension has been set up on the machine.

[NOTE: I just discovered that something that has broken the file association, which had previously worked for me. It now only works when I am administrator, and the JAR icon even disappears otherwise. I assume that some recent install has messed with that and the candidates are (1) OpenOffice.org 3.0, (2) WinRAR, or (3) a Java update download. However, the following all work when the association is made to work.]

The "program" Clicker.jar runs as a Java application when (1) I double-click on it in a Windows Explorer window, (2) When I create a console shell where I am in the same directory and I perform the command ">Clicker.jar" (3) when I send a shortcut to my desktop and double-click on it, and (4) when I put the full path in the Windows XP Run ... box.

I don't know that these will be found in a PATH search, and I normally wouldn't arrange that anyhow.

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