The Java Web Start 1.2 product contains the following new features
and enhancements as compared with previous versions.
"One-Click" Auto Installation (Microsoft Windows platforms only)
This feature has been added in order to improve the experience of those users
who do not have Java Web Start already installed when they encounter a Java
Web Start application. This enhancement is designed to make the Java Web
Start installation as transparent as possible to the end user.
Prior to implementation of this feature, developers could use some
JavaScript in their web pages to detect whether a user already had
Java Web Start installed. If not, the JavaScript could provide a link
by which the user could go to a download page for Java Web Start.
Users who needed Java Web Start would need to go through several
mouse clicks and web pages in order to access and download Java Web
Start and, finally, the application.
With the new auto installation feature, users who don't have Java
Web Start will be prompted to download Java Web Start from
java.sun.com. They will click through one security dialog box,
which will automatically initiate a download of either Java Web Start alone
or Java Web Start plus Java Runtime Environment 1.4.1, depending on
how the developer has set up the application's web page.
When the download is complete, Java Web Start (and the Java Runtime
Environment, if it was downloaded) will be automatically installed on
the user's machine, and then Java Web Start will launch the application.
Note -- This feature is available only for Microsoft Windows
platforms.
For more information about the auto-installation feature, see the
Developer's Guide.
Customizable Splash Screens
Java Web Start 1.2 provides the ability to customize the "splash" screen
that appears when launching an application. By default, the following
image will appear when launching an application using Java Web Start.
Developers may use alternative images for an application by adding an
icon element with a kind="splash" attribute to
the application's JNLP file. For example, the following element
would indicate that the image contained in the file MyIcon.gif
should be displayed as a "splash" image during application launch.
<icon kind="splash" href="/javase/technologies/desktop/javawebstart/1.2/docs/MyIcon.gif"/>
Splash image files can be either GIF or JPEG format.
As with all icon elements, the href attribute for a splash image
can be either an absolute or relative URL. If relative, it is relative to
the URL specified in the JNLP file's codebase element.
If the JNLP file does not contain an icon tag with a kind="splash"
attribute, but does contain another icon tag, Java Web Start will
display a splash screen consisting of the image specified by the icon
element on the left and the application's title and vendor on the right.
The title and vendor are taken from the title and vendor tags
in the JNLP file. Here is an example splash screen of this sort for the Draw
application demo.
If the JNLP file does not contain any icon tags, the splash image
will consist of the application's title and vendor, as taken from the JNLP file.
Splash images will be surrounded by a border defined by Java Web Start.
The first time an application is launched following the addition or modification
of the icon element in the JNLP file, the old splash image will
still be displayed. The new splash image will appear on the second and
subsequent launches of the application.
Support for Non-UTF-8 Encodings
Beginning with version 1.2, Java Web Start can parse JNLP files that are
encoded in UTF-8, UTF-16, and other encodings supported by the
J2SETM platform. In previous releases
of Java Web Start, only UTF-8 encoding was supported.
Specify a non-UTF-8 encoding in the XML prolog of the JNLP file.
For example, the following line indicates that the JNLP file will be
encoded in UTF-16.
<?xml version="1.0" encoding="utf-16"?>
The XML prolog itself must be UTF-8 encoded.
See the J2SE documentation for a list of encodings supported by the J2SE platform, and
now supported in JNLP files.
Sample Code
A JNLP Client, such as the Application Launcher included with the Java Web Start
product, makes a set of services available to applications that it launches.
The applications can access the services through the JNLP API. The specification
for the JNLP API is provided in the javadoc directory of the JNLP
Developer's Pack. (See the Developer's Section of the Java Web Start web site.)
Several sample applications that use the JNLP API are available on the
Java
Developer Connection website. Each includes a readme file that summarizes
what is contained in the sample, source files for the application, and jar files
with libraries and resources required to build, run, and deploy the application.
The samples are:
- WebPad
- This is a simple word processing application that allows users to create, open,
modify, save and print files. The WebPad application uses JNLP API extensively to
access resources locally when running in the untrusted execution environment.
- Random Access File Sample
-
This sample demonstrates features of the JNLPRandomAccessFile interface
of the JNLP API. The user picks up a file that is opened as a random file for both
writing and reading.
- Extension Installer Sample
- This sample using the ExtensionInstallerService feature of the
JNLP API installs a native shared library to the client machine and informs the
JNLP Client of a directory where it should search for native libraries.
- Library (native) Installation
-
This sample uses the <nativelib> element in the resources section
of a JNLP file to install a native shared library on the client machine.
- CORBA Sample
-
The purpose of this sample is to demostrate how CORBA applications can be
deployed using Java Web Start. It includes a very simple "Hello World"
application using RMI-IIOP.