Java Reference
In-Depth Information
Deployment .This step requires a Web server with upload access and with at least some
administrator control on it. The code in these chapters, when not otherwise specified,
works with a standard Web server (that is, no extra CGI or servlet support required). In
Chapters 12 and 13, we will need some special support from the Web server.
Client . For the client environment, we need a Web Browser plus a Web connection, con-
figured proxy servers, and so on; and a JNLP client installed (for example, Sun's Java
Web Start) that comes shipped with a J2SE JRE.
The typical development iteration is as follows:
1. Compile your classes; and stuff them with your icons, property files, native libraries, and
miscellaneous items into some JAR files. Move those JAR files to the deployment server
(that is, your Web server).
2. Write down your JNLP files pointing to the JAR files (accessible from the Web server)
that you created in the previous step. Move the JNLP files to the correct directory on the
Web server. Now your clients are ready to download your application.
3. Go to the client computer, and launch your application via an URL pointing to the
desired JNLP file.
What does all this mean for developers? To begin with, it means that their production and test-
ing environment is quite sophisticated and needs some extra care.
8
For example, a common problem that novices encounter with this kind of development is
cache management. We have at least three distinct caches to be aware of:
•JNLP Client's cache. Even if our application did not work, it could have remained
cached somewhere in the JNLP Client. For Java Web Start cache management, see this
chapter's last section, “Java Web Start”.
• Some other latencies along the processing pipe. Once compiled, classes and other files
must be packed into JAR files and shipped to the Deployment Server. Be aware of all the
needed steps and their possible twists, especially if some IDE is doing them for you.
•Browser's cache. Did you modify your JNLP file, but it didn't work out? Probably the
browser is still using an old version of your launching file. Don't forget the Refresh but-
ton on your browser when modifying your JNLP files. (Netscape users may use the
Shift+Refresh combination for completely reloading the current page).
What Is JNLP?
JNLP is a technology that enables the launching of remote Java 2, Standard Edition programs.
Naturally, the JRE and all the needed resources (JAR files, extensions, and so on) must be
Search WWH ::




Custom Search