# Java Notes

# Deployment

Java is a very nice programming language, but the weakest part entire infrastructure is the deployment -- getting the program running on the user's machine.

## Applications

### Installers

- launch4j.sourceforge.net/ (Free)

  From their home page: "Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one, and it's possible to set runtime options, like the initial/max heap size. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found."

- Jelude (http://www.geocities.com/java_intro/?200621).
- IzPack (www.izforge.com/izpack/) - Free

  From their home page: "IzPack is an installer generator for the Java platform. It produces lightweight installers that can be run on any operating system where a Java virtual machine is available. The most common use is to distribute applications for the Java platform, but you can also use it for other kinds of projects. The main benefit of IzPack is that it provides a clean and unique way of distributing a project to users using different operating systems."

- Java to EXE - Why, When, When Not and How
- Deployment: Easy Installing with IzPack

## Applets

## WebStart

Java WebStart (JWS) should be the perfect solution. The program is loaded over the Internet, but unlike an applet, it remains on the local machine. Whenever it's run, it checks back with the server it came from for updates, and makes them if necessary. Unless the user explicity gives it more permissions, it can only run in a "sandbox", which doesn't potentially harmful operations are forbidden to the program.

Despite the potential, JWS doesn't always live up to it, partly because of some interface issues, partly because the wide range of user environments, and partly for other miscellaneous problems. I've used it and have been satisfied, at least from the user's point of view. From the develper's point of view I've had problems getting the required JNLP file built correctly.

Here are some interesting links about potential problems.

- joust.kano.net/weblog/archive/2006/04/06/why-i-will-never-deploy-with-java-web-start-again/ Why I will never deploy with Java Web Start again by Keith Lea
- kylecordes.com/2006/04/08/auto-update-no-web-start/ Why I will also never deploy with Java Web Start again by Kyle Cordes echoes the previous entry.

## Web

## Jars