Describing Applications and Applets
As we saw in the preceding section, there are essentially two different uses of JNLP files. One
for describing applications (or applets) to be launched, and another one that specifies other
necessary pieces that are too complex to be described as mere resources. Here, we will focus
on the first type of descriptors.
An application descriptor is always needed, whereas extension descriptors are used for particu-
lar needs, such as the installation of new JREs, native libraries, and so on.
A JNLP Client can launch two types of executables: applets and applications. In reality, one
may think of something like a third type of applications that can be launched: those applica-
tions which take advantage of the JNLP Client runtime services, and couldn't otherwise run in
a normal JRE basic environment. Runtime issues will be the subject of Chapter 11, “Runtime
Client Services”; here, we are only interested in defining executables by using JNLP files.
Application descriptor JNLP files describe core information about the executables to be
launched. An application descriptor must be supplied in the input to the JNLP Client to start
the launch procedure. In any JNLP file describing applications, there are five types of data that
can be specified:
• Management data needed for the JNLP Client in order to handle properly the JNLP files,
such as specifying security restrictions, and so on.
• Basic information about the application, such as the application home page, icons, and so
•Various resources, in the form of JAR files.
• Needed extensions. Specified within the resources element.
• Application- or applet-specific data, such as input parameters, and so on.
Listing 9.2 shows an example of the application-desc element at work.
L ISTING 9.2
An Example of the Application-Desc Element