Directories, examples, and Java sources are organized by chapters. The chapters are rooted in
the b2 directory. In the examples, the Web server has been brilliantly called “ server ”. If some-
thing doesn't work on your local configuration, just open up a JNLP file, and study its href
attributes or modify them. If you encounter problems with proxy settings, try to have a look at
the end of the “Java Web Start” section in this chapter.
So, to recap: At the end you'll have a directory named “ b2 ”in your document home directory.
Then, inside it there are the directories c8 , c9 , c10 , c11 , c12 , and c13 . The examples in this chap-
ter are in the c8 directory. As it happens sometimes, the first examples are somewhat elemen-
tary. If you want to see something interesting, feel free to point your Web browser at Chapters
11-13, but before leaping ahead, I suggest you follow the advice in the following examples.
A First Example
Let's launch our first application with JNLP. In this first example, we will limit ourselves to
the very essential: no icons or other gadgets, not even a Web connection. We will work only
with local files.
The very first thing to do is to install Java Web Start, if you haven't already done so. You can
download it from Sun's site at http://java.sun.com/products/javawebstart/ . We will see
at the end of this chapter how to set up the reference JNLP Client (Sun's Java Web Start).
In order to set up our first application deployed with JNLP, we have to perform the following
steps, having already installed Web Start or another JNLP Client:
Compile sources, and pack them into the JAR file (or use the one given on the compan-
ion Web site).
Copy the JNLP file and the JAR file on the local disk. In the original JNLP file, the test
directory has to be located at “ c:/ ”. If you haven't the permissions to write there, just
modify the JNLP file as needed. Note that even if you downloaded the examples, you
still have to manually copy the test directory.
Double-click the JNLP file.
For this very first example, we will cover all the steps up to the final execution. In the
following examples, we will skip some basic operations such as source compilation,
and so on.