Developers guide

50
Web Start is designed to address several of the problems traditionally associated with the
deployment of standalone applications:
Installation Issues
Upgrading to the latest version
Different versions of the JVM
Once Web Start (or any JNLP client) is configured on the users machine, any Web Start
application can be downloaded, installed, and executed from a single click on a web page.
A JNLP enabled application is specified by an xml configuration file labelled <app-name>.jnlp.
This file contains all the information required to setup and run the application such as jar file
resources, properties, and main class information. The APT jnlp configuration files can be found in
Appendix F.2.1 and F.2.2.
JAR files (Java ARchive) are similar to tar, or zip files. They are a collection of all the files required
by the application, including class files, images, and other resources. Adding a jar file to the
CLASSPATH variable is equivalent to adding the root directory of the extracted jar.
There are several third party implementations of JNLP such as NetX (part of the Object
Component Desktop project
i
) and OpenJNLP (openjnlp.nanode.org) both striving to provide a
richer implementation of JNLP than Web Start. However, both these implementations are still very
much in a beta stage only partially implementing the JNLP specification.
6.3.1 Versioning
JNLP supports versioning of resource jar files in two ways. Either a versions.xml file to be used in
conjunction with the JnlpDownloadServlet or simply naming the jar files according to the
parsing grammar shown below in Figure 6-1.
file ::= name __ options . ext
options ::= option ( __ options ) *
option ::= V version-id |
O os |
A arch |
L locale
Figure 6-1 JNLP VersionID parsing grammar
Jar file versions are specified using the file naming convention for several reasons. Firstly, the
version of the jar files can be identified simply using a dir or ls command, a particularly useful
feature in a UNIX environment where command line control is required. Also, the versions.xml
file is yet another configuration file that must be maintained for the system to operate correctly.
This added complexity is also the reason the JnlpDownloadServlet was not used in the first
implementation of the APT deployment system. It is, however the obvious choice for improving
the system to achieve faster and more efficient client download times.
Note that JNLP features such as JARDiff, designed to allow Web Start clients to only download
the changes from one version of a jar to another, as opposed to downloading the entire new
version, are only provided by the JnlpDownloadServlet.
i
http://ocd.sourceforge.net