Java Reference
In-Depth Information
some standard support would be quite useful, especially when interoperability features are
desired. Despite that, JNLP technology is quite useful and, after all, still needs some time to
mature.
Having seen some aspects concerning the adoption of the JNLP technology, it is now time to
get into the details.
The Stages
In this section, we will explore the protocol steps sequence in detail.
First of all, a JNLP Client must be installed on the client computer. Then, we need a JNLP root
file, that is, the main JNLP file that describes all the needed pieces and how to use them. By
following directives in the main JNLP file and in the other extension files, the application can
be launched. The dynamic structure (that is, how the file is interpreted by a JNLP Client at run-
time) is depicted in Figure 9.2. Here, the main file points to its installer extension, its JAR
resources that made up the application itself (files myApp , myIcons ), and a set of libraries orga-
nized in a component extension.
When the JNLP Client has retrieved the main JNLP file, it begins the launch procedure by
parsing the file interpreting the XML elements. First of all, the client launcher makes sure that
it has the right JRE available, eventually downloading it. Then, for each extension descriptor
found in the JNLP file ( <component-desc> and <installer-desc> elements), it retrieves all
the needed resources. In the case of extension descriptors contained in other extension descrip-
tors, it downloads them recursively.
When they are all loaded, it begins executing the installers, as we saw in the splash window
example of Chapter 8, “A Quick Launch.” Finally, when the installers give the green light, it
launches the application.
To recap what was said, in Figure 9.3 there is a picture of the steps involved in launching a
Java application with JNLP.
Search WWH ::




Custom Search