Java Reference
In-Depth Information
Therefore, changing the descriptor part of the JNLP file makes it behave like a component
descriptor. Note that all the elements described for application descriptors, together with their
attributes, still apply for component descriptors JNLP files as well. In order to use component
descriptors, you have to reference them from your main JNLP file or its subordinate JNLP files
(such as extensions, and so on). In Chapter 13, “A Complete Example,” we will see an example
of this.
Regarding the preparation of component descriptor files, some general considerations may
apply:
• When factoring out JAR files for component descriptors, reusability must be taken into
account. The time spent in writing an effective JNLP-deployed library must be repaid in
terms of its use.
• Component descriptors have the interesting side effect of keeping your resource environ-
ment tidy for deployment. That could be enough to adopt it even for relatively small (but
complex) projects.
•As with writing code libraries, a series of guidelines should be kept in mind. All possible
cases should be thought out in advance from a long-run usage perspective, providing
platform-aware resources elements and locale-specific ones when appropriate.
Installers
Installer descriptors are used when there is some extra work to do before an application is
launched. There are essentially two different reasons for using custom installers:
•For installation considerations. If you have to put some resource file in some places on
the local filesystem, or if you have to connect back to some remote server before starting
the installation, etc., you need to provide your own installer code.
•For end-user considerations regarding the GUI. For example, to reduce the number of
splash windows proposed to users, or to offer a more recognizable product, and so on. In
these situations, the standard JNLP Client window, even if customizable, may be inap-
propriate.
Listing 9.12 shows the installer-desc element.
L ISTING 9.12
The Installer-Desc Element
<jnlp>
...
<resources>
<jar href=”http://www.mysite.com/my-installer/installer.jar”/>
...
Search WWH ::




Custom Search