Java Reference
In-Depth Information
Java Web Start
One of the issues you must deal with as a Java programmer is how to make your soft-
ware available to your users.
Java applications require a Java interpreter, so one must either be included with the appli-
cation or previously installed on the computer. Lacking either of those, users must install
an interpreter themselves. The easiest solution (for you) is to require that users download
and install the Java Runtime Environment from Sun's website at http://www.java.com.
Regardless of how you deal with the requirement for an interpreter, you distribute an
application like any other program, making it available on a CD, website, or some other
means. A user must run an installation program to set it up, if one is available, or copy
the files and folders manually.
Java applets are easier to make available because they can be run by web browsers.
However, if your program is a Java applet, users must be running browsers equipped
with the Java Plug-in. This too can be downloaded from Sun as part of the Java Runtime
Environment.
There are several drawbacks to offering applets instead of applications. The biggest is the
default security policy for applets, which makes it impossible for them to read and write
data on a user's computer, among other restrictions.
Java eases the challenges of software deployment with Java Web Start, a means of run-
ning Java applications presented on a web page and stored on a web server. Here's how it
works:
1. A programmer packages an application and all the files it needs into a JAR archive
along with a file that uses the Java Network Launching Protocol (JNLP), part of
Java Web Start.
2. The file is stored on a web server with a web page that links to that file.
3. A user loads the page with a browser and clicks the link.
4. If the user does not have the Java Runtime Environment, a dialog box opens asking
whether it should be downloaded and installed. The full installation is more than
65M in size and could take 30-45 minutes to download on a 56K Internet connec-
tion (or 3-5 minutes on a high-speed connection).
5. The Java Runtime Environment installs and runs the program, opening new frames
and other interface components like any other application. The program is saved in
a cache, so it can be run again later without requiring installation.
 
Search WWH ::




Custom Search