Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop Client applications > Deploy client applications > Deploy and running a Java EE client application


Download and running a Java EE client application using Java Web Start

Learn about the Java Web Start technology 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.

The supported client platforms for deploying application clients using the Java Web Start are the same as the IBM Application Client for WAS 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:

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 WAS 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.

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 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.

WAS 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 WAS 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.

WAS also provides command-line utility programs to create this application client container and runtime package from an existing IBM Application Client for WAS 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 WAS installation.

To run the Java EE application client, the EAR file is deployed as a JAR resource described in the JNLP descriptor file.


Procedure

  1. Identify the client machine operating system, and install the corresponding IBM Application Client for WAS 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 WAS for Windows.
  2. Run the utility programs to create the application client container and runtime package.

    1. Use the buildClientRuntime tool utility to create the package.

    2. 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.

  3. 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 JSP file to provide a dynamic JNLP response.

  4. Create the Java EE application client launch JNLP descriptor file.
  5. 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.
  6. All JAR resources must be Java signed, including the Java EE application client EAR file.
  7. 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.

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.


Related


Java Web Start architecture for deploying application clients
Client application Java Network Launcher Protocol deployment descriptor file
Prepare the application client run time dependency component for Java Web Start
Use the Java Web Start sample
Install Java Web Start
Use a static JNLP file with Java Web Start for Application clients
Install, updating, rolling back, and uninstalling the Application Client for IBM WAS


Related


ClientLauncher class
buildClientRuntime tool
buildClientLibJars tool

+

Search Tips   |   Advanced Search