Java Reference
In-Depth Information
Java Web Start
Java Web Start is the reference implementation for the Client of the Java Network Launching
Protocol. It provides four ways to launch an application:
•Directly from the Web, passing through the Web browser.
•Directly from pointing to the related JNLP file. Under Windows, for example, by double-
clicking on a JNLP file, or
•From the included Application Manager utility, part of the javaws executable.
•From platform-dependent mechanisms (items such as the Start menu or desktop short-
cuts in Windows).
Now, we will briefly discuss some aspects of Web Start from a developer's perspective.
Installing the JNLP Client is sometimes the biggest hurdle encountered in real-world situa-
tions, especially the first time when no Java Runtime Environment is installed yet.
There are a variety of options for solving the Java Web Start's first installation problem (future
upgrades are less traumatic, thanks to the “check for updates” option in the Application
Manager's console). The simplest option is to put a link directly to the Java Web Start home-
page at Sun: .
Another useful URL made available from Sun is the following:
bin/ , which launches directly the Java Web Start installation pro-
cedure without passing through the product's page.
Otherwise, you can wrap the Web Start installer together with your application in your installer
program. This, in turn, will install Web Start first and then launch it with your JNLP file and
resources, and so on. Another useful option is to use the silent command-line option of the
Web Start installer executable file to perform a silent installation. This installs Java Web Start,
without any user intervention, in a completely unobtrusive way.
Another option is to use some script inside HTML pages to tell whether Java Web Start is
installed or not, so as to dynamically modify the Web page according to the given user, as
shown in Listing 8.11.
L ISTING 8.11 HTML Snippet for Launching JNLP Applications
<SCRIPT LANGUAGE=”Javascript”>
var isJWSInstalled = 0;
var jWSHome = “”;
Search WWH ::

Custom Search