Creating Windows executable EXE file from a Jar file:
Though java is a platform independent and runs on any platform but sometimes we need to deliver applications for the end users who are comfortable with Microsoft Windows. It is very hard to explain them why the .class files generated can’t get executed with double clicks. Even if you create a Jar file and try to execute this using a batch (*.bat) file, most of the time the end user is required to edit the bat file to provide correct path of libraries and jar files.
Also sometimes you want to use Java’s robust class libraries to create stunning applications which can’t be possible using Visual Basic or Visual C++ or any other Windows specific tools. Sometimes development effort and learning curve are high in these tools also. In the above mentioned situations, you can use some good applications which will help you to create exe applications from your java applications within few seconds and might save your job
.
1. JarToExe Convert Wizard(v1.8) (http://www.regexlab.com/en/jar2exe/)
Jar2Exe is a nice tool to convert jar files into exe files so that it can be executed in Windows machine. It principal working startegy of this app is to start the JVM in windows using JNI (Java Native Interface). It can generate three type of programs – Command prompt console app, Windows GUI app and Windows Service app. The generated exe files can associate program icons to them as well as version information. it looks like true windows app. The completely free version can only create Command prompt based console app. for other type of apps you need to either use the Trial version or need to purchase from them.
2. JSmooth(http://jsmooth.sourceforge.net/)
JSmooth creates executable wrapper for the Java program or jar file. This is the standard exe file for windows. This also uses internally the JVM. It makes the life of software developer easy by automatically locating the VM itself. If there is no VM available it displays message or redirect user to the download website. In terms of configurable, the application is very good to create the wrappers or configure the executable binary files. Through the GUI editor, developer can add properties file or add environment variables or any classpath configurations. It is very simple to use. So how wrapper like JSmooth works? Java wrapper is basically custom Java launcher which is kind of self extracting application. When it is invoked, it extracts all the files like application classes, jars, libraries or properties files etc. and executes the main class file through the Java VM. However when the app is terminated or closed it removes the files and resources.
3. Launch4j (http://launch4j.sourceforge.net/)
Launch4j acts like a Java wrapper for cross platform. It not only can create Windows native executables but can be configured to create wrapper applications for Linux, UNIX, Mac Os X or Solaris. Even this can create launchers for Jars and class files without wrapping. It is different from other wrapper tools because it doesn’t extract the jar files and other resources from the executable app. Even this is so configurable that it can show splash screen while the Java application is loaded and started. One of the significant feature is this applications is very lightweight, only 26 kb.
4. Exe4j (http://www.ej-technologies.com/products/exe4j/overview.html)
Exe4j is also a JAVA exe maker which creates launcher for the Java application in Windows platform. It also supports command line app and GUI app or service app. This also helps user to integrate splash screen.
Related Articles:
- Step by step guide to create Singleton design pattern with Java Singleton design pattern is a kind of design pattern which...
- JfreeChart Series-3: How to create a dynamic 3D Pie Chart using JFreeChart library in Java You may refer to the earlier tutorials if you have...
- Reading user input in java Sometimes in our stand alone java program we need to...
- JfreeChart Series-1: How to create a dynamic Bar Chart using JFreeChart library in Java In Java creating any graph or chart like bar chart...
- JfreeChart Series-2: How to create a dynamic Pie Chart using JFreeChart library in Java  In the earlier tutorial I showed you how to create...
- How to develop PHP applications in Windows platform Most of my developer friends complain that they are unable...
- Microsoft Windows 7 – another revolutionary operating system from the house of Microsoft Corporation Microsoft Windows 7 – another revolutionary operating system from the...
- Downadup – The new windows threat in 2009 infected millions of PC A new Computer worm named Downadup or Conficker is in...
- How to load a properties file in Java This tutorial will explain how to access properties file through Java...
- Java Comparator example Sometimes we need to sort objects based on certain attributes...
You can subscribe by e-mail to receive news updates and breaking stories.