Java™ Web Start technology
is provided by the Java Standard
Edition runtime environment to deploy Java Enterprise
Edition application clients, including Thin application clients, on
the remote client machine with a single click from a web browser on
the client machine.
Before you begin
The supported client platforms for deploying application
clients using the Java Web Start
are the same as the IBM® Application
Client for WebSphere® Application
Server supported platforms, except Linux on Power® and OS/400® operating systems.
Before you
begin this task, see the following topics to understand Java Web Start technology and its components:
Supported configurations: The Sun Java Web Start, which is available from Sun
Microsystems, is not compatible with the IBM Runtime
Environment, Java 2 Technology
Edition, which is provided by WebSphere Application
Server and the IBM Application
Client. The IBM Runtime Environment
contains some additional functionality that is not supported in the
Sun Java Web Start. Also, the IBM Runtime Environment uses a different
packaging structure than the Sun Java Web
Start. Use the IBM Runtime Environment.
sptcfg
About this task
To deploy application clients using Java Web Start, the client machine must have
at least a Java SE runtime environment
installed. The Java SE runtime
environment includes the Java Web
Start, which implements the JSR 56: Java Network
Launching Protocol and API. The application clients Enterprise Archive
(EAR) file is a Java archive
(JAR) resource in a JNLP descriptor file that resides on a central
server. The JNLP descriptor file also specifies the runtime environment
requirement for running the application.
WebSphere Application Server provides a
launcher class to launch the Java EE
application client in the application client container inside of Java Web Start. The client machine
might not have the IBM Application
Client for WebSphere Application
Server installed. If this is the case, create and install an application
client container and runtime package as a runtime environment through Java Web Start. The JNLP descriptor
file specifies this runtime environment as the required runtime environment
for running the Java EE application
client.
WebSphere Application
Server also provides command-line utility programs to create this
application client container and runtime package from an existing IBM Application Client for WebSphere Application Server
installation, as well as an installer class to install this package
as a runtime environment for the application client container and
also the Java Runtime Environment
(JRE) in the IBM Application
Client for WebSphere Application
Server installation. To run the Java EE
application client, the EAR file is deployed as a JAR resource that
is described in the JNLP descriptor file.
Procedure
- Identify the client machine operating system, and install
the corresponding IBM Application
Client for WebSphere Application
Server on a development machine. For example, if the Java EE application clients are
targeted to run on Windows operating
systems, install the IBM Application
Client for WebSphere Application
Server for Windows.
- Run the utility programs to create the application client
container and runtime package.
- Use the buildClientRuntime tool utility
to create the package.
- Use the buildClientLibJars tool utility
to create the JAR files containing the launcher and the installer
class. This utility also zips up the properties files in the <app_client_root>/properties
directory.
- Create the runtime installer JNLP descriptor file. The JNLP response must be included in the JNLP version ID to
indicate the current runtime version in the response header, for example, x-java-jnlp-version-id=1.6.0.
Using a servlet of a JavaServer Pages (JSP) file to provide a dynamic
JNLP response.
- Create the Java EE
application client launch JNLP descriptor file.
- Package the application client container runtime environments
and the Java EE application
in an Enterprise Archive (EAR) file. Depending on your
preferred deployment strategy, the files can be in two separate Web
modules, or combined into one.
- All JAR resources must be Java signed,
including the Java EE application
client EAR file.
- Deploy the Enterprise Archive file on an application server,
and start the application. The Java EE
application client is ready to be deployed.
Example
A Java Web Start
deployment Sample is included in the client samples. This Sample demonstrates
the steps to deploy a Java EE
application client with an automated ANT script. The Sample has a
servlet to generate the runtime installer JNLP response with JNLP
version ID, for example, x-java-jnlp-version-id.
Important: When the application client initially launches using Java Web Start from Sun Microsystems Java SE Runtime Environment 6.0,
it installs the Application Client runtime, which includes the IBM JRE. An null pointer exception
(NPE) is thrown from the
com.sun.deploy.services.WPlatformService.getSecureRandom() method.
This is a known bug in Sun Java SE
6 (
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6505528).
If you experience this exception, relaunch the application. The NPE
only occurs on the first launch of the application client.