Forum

This content is now out of date.

Visit Our Community

Launch4J

Is it possible to get a walkthrough of creating a custom windows installer using the Launch4J application that was referred to in the wiki? I've managed to unpack the installer, change the appropriate items, and repack it into a .jar, but the Launch4j application has very little useful documentation.
Just to add some more specific information to this:

Where do I get the JRE for bundling? I already have Java 7 Update 25 installed, and a JDK 1.7 update 25.
Hi Justin,

I'm not sure how familiar you are with launch4j, so I'll give a bit of background. launch4j is a tool that can create Windows .exe files from java executable jar files. Essentially all it does is wrap the .jar file in a .exe wrapper so it can be easily run in Windows environments. Any executable jar file can be wrapped in this way - we use it to wrap our installer jar files.

We use Launch4j version 3.0.1 to create our Windows installers. This is a relatively old version, so you could try using a more recent version, but that's the version we have experience with.

Once you have downloaded and extracted/installed launch4j, start it by running "launch4j" from the command line. How you do this will depend a bit on your operating system. You should get a graphical interface with a lot of options available. This interface allows you to select the jar file to wrap, give it an output (.exe) file name, and configure how the exe file should be created. Once you have set the options, click on the "Build Wrapper" icon in the toolbar, and it will create the exe file for you.

You can automate the exe file creation by saving your settings as an xml file, and passing that to the launch4j command. It is also possible to run launch4j as part of an Ant or Maven build script (this is how we use it).

Launch4j also lets you bundle a JRE with your installer. We don't do this - the Yellowfin installers require a JRE to already be installed on the system.

I have added screenshots of the interface below, with the settings that we use to create our installers. Let me know if you have any more questions.

Thanks,
Steve


Forum image


Forum image


Forum image


Forum image


Forum image


Forum image


Forum image


Forum image


Forum image