installed locally before launching the program. Therefore, JNLP is not a deployment technol-
ogy per se; rather, it is a remote launching protocol with some extra features. These extra fea-
tures, apart from being able to execute a Java program from a given URL are (i)offering a
client environment to launched programs, (ii) ensuring a secure environment to clients, and
(iii)taking care of all the behind-the-scenes deployment issues. Of course, there are other fea-
tures offered by this technology, and we will see them later. However, it is useful to focus on
the main characteristics first.
The kind of Java programs that can be launched by JNLP clients are Java applets and applica-
tions written for the J2SE (Java 2 Standard Edition). Given the many implementation details
(such as the extensive use of custom class loaders, for example) and the security model
adopted for the protocol, Java 1.1 legacy executables have to be re-engineered in order to be
employed. Furthermore, JNLP-deployed applications have to comply with some simple rules,
such as running in a restricted environment if not authenticated, or accessing resources
(images, property files, etc.) that are contained only in the downloaded JAR files. These are not
severe limitations at all, but it is important to point them out at first. Figure 8.1 synthesizes this
F IGURE 8.1
The set of Java executables that can be deployed via JNLP.
How JNLP Works
The basic steps in any Java applet/application (from now on, we'll use application for brevity)
deployed with JNLP are as follows (see Figure 8.2 below):
Execution of the JNLP client with a JNLP file.
The JNLP Client takes care of retrieving and automatically caching all the pieces needed
by the application, following the instructions contained in the JNLP file. The next time
there will be no need to download them again. It even checks for new versions eventu-
ally available on the server.