Question

How can I convert my Java classes to an executable .EXE file for Windows?

Answer

This is a very common question asked in the comp.lang.java newsgroup. Its often useful to have an executable application when deploying your applications to a specific platform, but remember to make your .class files available for users running Unix/Macintosh/other platforms.

Microsoft used to provide a free system development kit (SDK), for Java, which includes the jexegen tool. This will convert class files into a .EXE form. The only disadvantage is that users need a Microsoft Java Virtual Machine (JVM) installed. Microsoft no longer supports this however, and you should transition to a new Win 32 Java system. See http://java.sun.com/ for the latest version of a Java interpreter for Winodws.

Though I've not used these tools personally, others have recommended Visual Age for Java, and Duckware's Java to Windows EXE (Java2Exe) application available from http://www.duckware.com/java2exe/index.html 


Back