Home > DeveloperSection > Forums > How can I convert my Java program to an .exe file?
Jayne Spooner
Jayne Spooner

Total Post:21

Posted on    July-29-2015 7:12 AM

 Java Java 

 1 Reply(s)
 547  View(s)
Rate this:
If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file?

Is there an open source program that can do that?

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    July-29-2015 8:05 AM

Some options:

Executable Jar File

See also Distributing your Application as an executable JAR file and the Oracle docs on how to create a jar file that can be executed with a double-click on Windows.

JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications. It makes java deployment much smoother and user-friendly, as it is able to find any installed Java VM by itself.

JexePack is a command line tool (great for automated scripting) that allows you to package your Java application (class files), optionally along with its resources (like GIF/JPG/TXT/etc), into a single compressed 32-bit Windows EXE, which runs using Sun's Java Runtime Environment. Both console and windowed applications are supported.

A LAX Executable is an executable file that is used to launch a Java application on any LaunchAnywhere-compatible platform. Currently, InstallAnywhere creates LaunchAnywheres on Windows 95/98/NT/2000/Me, Solaris, Linux, and Mac OS X. LaunchAnywhere enables end-users to double-click on an icon (Windows or Mac OS X) or type a single command (UNIX) to start a Java application.

Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one, and it's possible to set runtime options, like the initial/max heap size. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found.

Don't want to miss updates? Please click the below button!

Follow MindStick