HOW CAN I CONVERT MY JAVA PROGRAM TO AN .EXE FILE?

Jayne Spooner

Total Post:21

Points:147
Posted by  Jayne Spooner
Java 
 908  View(s)
Ratings:
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?
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: How can I convert my Java program to an .exe file?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!