Many developers need, or have needed, distribute their Java applications so that Windows users could start them naturally, not running java -jar <jar file> command or batch (.BAT) file.

I’ve been there too, then I found a easy and with many resources solution: JSmooth

This software allow you “transform” your JAR file in an executable (EXE), but, of course, will need the JVM already installed and running.

Here I only have mentioned the settings that I consider important, then let’s go!


Download JSmooth in http://sourceforge.net/projects/jsmooth/files/;

After install (or unzip, this depends of file that you have downloaded) run him;

In the side menu, click in “Skeleton”;

1

In the “Skeleton Selection” screen you need define how application will be run, select “Window Wrapper”.

In “Skeleton Properties”, you need define a message when user have no JVM installed (“Message” field) and where can be downloaded (“URL” field).

The “Launch java app in the exe process” field define if JAR file will be executed in same process of EXE (only the executable process will be displayed in Windows Task Manager), otherwise the javaw.exe will be displayed too.

The “Single Instance” field define if more than one instance can be opened.

“Debug Console” open the EXE from prompt window, displaying possibles outputs.

Now click in “Executable”

2

In “Executable Setting” you inform where EXE will be builded (“Executable Binary” field), the EXE’s icon (“Executable Icon” filed) and what will be the application execution directory.

Click in “Application”

3

First, click in the icon 7 and select JAR that contains the main class.

After, select the main class in the field “Main Class” clicking in button 8.

In the field “Application arguments” you can inform necessaries parameters for your main class.

“Embedded JAR” field allows you to aggregate your JAR file in EXE file, in other words, only EXE file will be necessarie, because the JAR will be uncompressed by EXE in each execution.

Now click in “JVM Selection”.

4

Here you can define the minimum and maximum version of JVM that your application support.

The “JVM Serach Sequence” inform the seek order of javaw.exe file, in this case, he search in resgistry first, after in JAVA_HOME enviroment and so.

Click in “JVM Configuration”.

5

Here the maximum and minimum memory available for your application can be configured, as the options that can passed to JVM.

Until here we only have configured the JSmooth. To build the EXE file click in button 6. If you don’t have saved the project, a new window will open to choose the place to save. Done it, the EXE file will be create in directory mentioned in “Executable Binary” field of “Executable” screen.

Now just execute the EXE file and your application will be run!

To more information visit http://jsmooth.sourceforge.net/

I hope you enjoyed, feel free to comment!

Until next! :)