Java Reference
In-Depth Information
L ISTING 9.12
Continued
</resources>
<installer-desc main-class=”com.mysite.installer.Main”/>
</jnlp>
Let's examine a simple recapping example about installers. In Chapter 8, we already saw an
example of a JNLP application that hid the standard JNLP downloading window in order to
show its own splash screen. Now, we see how the same result can be achieved by customizing
the JNLP Client's download window, through the use of the ExtensionInstaller class, as
described in Chapter 11.
In our example, we have a main JNLP file launching our application by means of a custom
installer, specified in the extension element, at lines 12-15 of Listing 9.13.
L ISTING 9.13
The jnlpinstaller-main JNLP File
<?xml version=”1.0” encoding=”UTF-8”?>
<jnlp spec=”1.0+”
codebase=”http://server/b2/c9/”>
<information>
<title>Installer Template</title>
<vendor>Mauro's Workshop</vendor>
<offline/>
</information>
<resources>
<j2se version=”1.2+” />
<extension
name=”Installer”
href=”jnlpinstaller-ext.jnlp”>
</extension>
9
<jar href=”anapp.jar” />
</resources>
<application-desc main-class=”com.marinilli.b2.c9.AnApp” />
</jnlp>
In Listing 9.14, we can see the JNLP extension file that describes the installer.
L ISTING 9.14
The jnlpinstaller-ext JNLP File
<?xml version=”1.0” encoding=”UTF-8”?>
<jnlp spec=”1.0+”
codebase=”http://server/b2/c9/”>
Search WWH ::




Custom Search