Packaging JAR for Windows

How to create windows executable binary and Microsoft Software Installer from a simple executable JAR like all the packages I provide for Linux and it all started a while ago when someone asked me why I was providing full packages for Linux but only a executable JAR for windows users and although the answer was simple I am a Linux user I also though there is no reason for me not to attempt to provide a simple installer with a Windows executable binary (EXE) if it was FREE.

So here is what I found out and what you need to create windows executable binary (EXE) and Microsoft Software Installer (MSI)

1) Download and Install VirtualBox current version 5.0 (https://www.virtualbox.org/)
2) Install your preferred version of Windows OS
3) Download Launch4J current version 3.8 (http://launch4j.sourceforge.net/)
4) Download Inno Setup current version 5.5.6 (http://www.jrsoftware.org/isdl.php)

Those instructions will assume you have a Windows system or you are running a virtual Windows client on your Linux or Mac host.
So straight to Point ( 3 ) and download Launch4J and install it, I am not sure what the minimum version of Windows is but I am running it on Windows 7 and it work very nicely.

Here are some screenshots provided by the developer:
basicSettings

jre

version

With this you will be able to create a Windows Executable binary (EXE) from a simple java executable Jar file and this will have the same effect as running the executable jar file itself apart from minor difference, if you don’t have java installed you will get a prompt and take you to the Java JRE download page  as easy as that.

Now for completion you will go to Step ( 4 ) and download and install Inno Setup on your Windows or Virtual Windows system. Again not sure what the minimum Windows version should be but works perfectly fine with my Windows 7 build.

Here are a couple of screenshots provided by the developer:

welcome

ide

This process and allowed me to create the “SmallTextPad.exe” file from the “SmallTextPad.jar” and then create “SmallTextPadSetup.exe” from the “SmallTextPad.exe, SmallTextPad.ico, SmallTextPadLicense.txt & SmallTextPad.jar”

Enjoy it



Leave a Reply