Best free tool to build an exe from Java code? [duplicate]

怎甘沉沦 提交于 2019-11-26 21:22:18

问题


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?


回答1:


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.




回答2:


The gnu compiler gcj




回答3:


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.




回答4:


http://sourceforge.net/projects/javaround

HTH




回答5:


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.



来源:https://stackoverflow.com/questions/309329/best-free-tool-to-build-an-exe-from-java-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!