L ISTING 9.8
<param name=”Param1” value=”Value1”/>
<param name=”Param2” value=”Value2”/>
The main use of this kind of JNLP file is for taking advantage of the JNLP Client environment
(deployment and runtime services) for existing applets. Generally speaking, previous to a
JNLP introduction, developers sometimes made improper use of applets, trying to address
problems that were too complex for the applet model. In this case, a complete rewriting of the
code to transform the old applet in a JNLP-launched application is probably the best solution.
Otherwise, if your code conforms nicely to the applet model, don't forget the Sun Plug-In
shipped with the JRE, which still remains the best choice for running applets.
We can see a JNLP file describing an applet in Listing 9.9.
L ISTING 9.9
An Example of a JNLP File Describing an Applet
<?xml version=”1.0” encoding=”UTF-8”?>
<j2se version=”1.2+” />
<jar href=”applet.jar” />
<param name=”name” value=”gus”/>
Despite being quite simple, the JNLP support for applets allows developers to specify
the JRE environment needed for running the applet.