Deploy on the Server JNLP Files and Resources
This step consists of copying all the JNLP resources obtained in the previous step and the
JNLP files on the deployment server with the planned hierarchical structure. The particular
arrangement will depend on the given JNLP server used. Usually, this one is implemented as a
servlet; in this case, the JNLP resources can be packaged in a WAR file, as discussed in
Chapter 5, “Deployment Options for Non-J2SE Clients.” Consult your JNLP server documen-
tation for details.
Some Considerations on the First-time Activation Cost
A full-fledged application could be large, even by Java standards. The simple word processor
proposed in this chapter could use several localization packages (and their correspondent input
methods) for each supported language, and it may use other optional packages for other add-
ons (not to mention the JavaHelp executables and the related JAR data files). Anyway, exclud-
ing bulky optional packages, an average Java application could be considered to be less than
1MB in size, in most cases. Adding the other required libraries (such as JDBC drivers, special-
ized libraries, and so on) can take up more space (for example, Java Advanced Imaging for
Windows platforms, an optional package, takes up 4.6MB). This will greatly increase the total
size of the resources to install. As a simple example, see the following table.
Average File Size
Help library and data
JRE with a JNLP Client
To t a l size
Most applications will not reach such sizes, although a few will get even bigger!
In real-world situations, core executables have a predictable size. The most important source of
size increase is caused by third-party libraries and the optional packages used.
The strategies we can employ for solving the problem of transferring such files to client com-
puters were outlined in Chapter 4. Here, we will adapt them to the JNLP technology.
The most important solution to reduce the first-time activation cost (in terms of download time,
see Chapter 2) is to split the size of the resources into several parts, to be transferred at differ-
ent times. Of course, the JNLP Client and the J2SE JRE must be transferred first. Then comes
the core module (for simplicity, we will consider only one core module) that comprises all the
needed libraries and optional packages.