When this is done, the JNLP client launches the Java application, waiting in the back-
ground to offer some runtime services, just as Web browsers do with applets. When the
application exits, so does the JNLP Client.
JNLP Client is
F IGURE 8.2
JNLP basic mechanism.
If you want to harness the power of JNLP, you will use it on a Web-enabled desktop. In this
case, the Web browser becomes a powerful mediator between the JNLP Client and your appli-
cation. By means of a browser, JNLP files can be given to the JNLP Client just by clicking a
normal link in a Web page.
One may say that the JNLP idea is a crossbreed of the best of applet and plug-in ideas.
Applets, in that JNLP defines a container, not like a mere application. (Despite this, developers
can also use JNLP for common applications without taking advantage of the richer runtime
environment.) Plug-ins, in that JNLP exploits the same mechanism in order to be invoked from
a Web browser. We will better see these similarities in a moment.
Getting a bit more formal and precise, by taking advantage of the model described in Chapter
2, “An Abstract Model for Deployment,” we can say that a JNLP Client is a particular kind of
Application Helper that we called an Application Container. Just like an applet container or a
J2EE bean container, it supports our applications even after it launches them.
In the first part of this topic, we saw many deployment methods. In particular, the applet con-
cept can resemble the JNLP approach.
The similarities with the applet model are:
• There is an external container (refer to Chapter 2) that manages the application, just like
the browser does with the applet, providing several services to the launched application
via the Java APIs.