Results tagged “java” from Jason Brome's Weblog

Java, .exe and NSIS

| | TrackBacks (1)

A posting on Brian Duff's blog about creating native Windows launcher executables for Java applications inspired me to write a short posting about my experience with the Nullsoft Scriptable Install System (NSIS).

I will not go into much detail about NSIS - I'll leave the review for a future post. Suffice to say, it is an extremely flexible Windows installer builder, exposing a powerful scripting language. Not only does the functionality offered by this scripting language allow the creation of installers, it also allows the creation of custom Java application launchers.

For my nntp//rss project I created a custom Java launcher in NSIS, based upon the Jelude and Java Launcher scripts. The script searches for a local install of the Java Runtime Environment, and, if it finds one, uses it to start launch nntprss-start.jar. You can find the code in the nntp//rss CVS repository. The nice thing is that you can easily display a dialog box if the user does not have a JRE installed, and then open a browser to Sun's Java Download page. Once you've created the launcher script, NSIS has a compiler that quickly turns the script into a small (~40K) executable.

NSIS is definitely worth checking out. I've also used it to build a .NET application installer that checks for the appropriate version of the .NET framework, and found it pretty easy to work with the scripting language. The product is supported by a great user community and, best of all, it's completely open source. You can check out the project at