The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Packaging Java applications

I have written several desktop apps in Java (J2SE), but have yet to uncover a nice way of packing them for distribution to non-tech-savvy users.

So, I was wondering if anyone out there has a nice method for packaging Java desktop apps for deployment.

Holler back if you have any suggestions!
Jacob Send private email
Thursday, September 30, 2004
Have tried Installshield?  I used it a long time ago and it was good enough.
Bill Rushmore Send private email
Thursday, September 30, 2004
Try InstallNow. You can get a copy at:

It builds the classpath for you so that can easily supply additional jars.

You also have the option to produce a native application with the JRE installer build in, so there one package to deploy (but it does make the application a big large!)
Thursday, September 30, 2004
Does you know of a way to create machine executable binaries of Java programs?  For example, could the user double-click on the icon of an executable JAR and have it launch the program like Excel would launch when double-clicked?

Thanks for your help!
Jacob Send private email
Thursday, September 30, 2004
Creating executable Jar files

Haven't ever tried this, though.
The Executor
Thursday, September 30, 2004
Hi Jacob,

you have several options:

1. There are a lot of commercial cross-plattform installers out there: i.e. InstallAnywhere, InstallShield, Install4j. Of those, I have experience with InstallAnywhere. A lot of people like it, but I had massive problems with it. See:

2. I know of one decent open-source cross-plattform installer: IzPack.

3. Windows-only installers, i.e. Nullsoft Scriptable Install System (NSIS) and Inno Setup. Both are free and powerful.

4. For exe-making, there are several products on SourceForge. My favorite is Roxes ANT tasks.

Hope this helps.
Janek Schwarz Send private email
Thursday, September 30, 2004
To be able to launch a JAR file by double clicking use file association (at least under Windows). When the JRE is installed under Windows it associates ".jar" with javaw.exe. So double clicking on a jar starts javaw with the jar as an argument. This is just like launching a spreadsheet by clicking on an xls file.

For this to work you will need to have the JRE installed. Also you need to set the Main-Class attribute in the jar's manifest. This tells javaw which class contains the main method.
If your jar depends on other jars,
you will also need to set the Class-Path attribute in the manifest.
John Send private email
Friday, October 01, 2004
My suggestion is use JSmooth to wrap the jar into a single exe, then use Inno Setup for the installation.
Jussi Jumppanen Send private email
Friday, October 01, 2004
Java WebStart
name withheld out of cowardice
Friday, October 01, 2004
Oh no, not Java Web Start !

Headaches, headaches, headaches...
Friday, October 01, 2004

Thanks for your suggestions, I'm going to try some of them out and report back on how they worked.

BTW, does anyone else think it odd that Sun didn't make a more straight-forward way of distributing Java apps.

(It might just be me, I come from a C++ background)

Anyways, thanks.
Jacob Send private email
Saturday, October 02, 2004
If you want to deploy to Windows, you might appreciate jexepack:

(No affiliation.  We bought one copy here at work for internal deployment.)
Jeremy Stein Send private email
Tuesday, October 05, 2004

So far, I have tried using the JSmooth program that Jussi suggested.

The flow of the user interface could be improved.  I think that it might actually work better as a wizard.  (Since it is a GPL'd project I'm thinking about making those changes myself.)

But it did accomplish one of the things that I want to do: make a Java program appear to be a binary executable.  It worked nicely for console, GUI, and console+GUI Java programs.

I will report back again once I have tried some others.
Jacob Send private email
Wednesday, October 06, 2004

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz