How do I create an .exe for a Java program?

Dónal picture Dónal · Feb 5, 2009 · Viewed 177.4k times · Source

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

I'd like to create a Windows .exe for a Java program. Previously, I've used JEXECreator for this, but it's not entirely satisfactory because:

  • The executable sometimes works on the machine on which it was created but not on others.
  • The program is commercial; if you use the trial version, it adds a nag screen to your application.

I don't need the generated .exe to work if Java is not installed on the target machine (in fact, I think this is impossible).

Any recommendations?

Answer

Jon Skeet picture Jon Skeet · Feb 5, 2009

Launch4j perhaps? Can't say I've used it myself, but it sounds like what you're after.