+

Search Tips   |   Advanced Search

 

Running application clients

 

The J2EE specification requires support for a client container that runs stand-alone Java applications (known as J2EE application clients) and provides J2EE services to the applications. J2EE services include naming, security, and resource connections.

 

Overview

You are ready to run your application client using this tool after you:

  1. Write the application client program.

  2. Assemble and install an application module (.ear file) in the appserver run time.

  3. Deploy the application using the Application Client Resource Configuration Tool (ACRCT) on Windows.

This task only applies to J2EE application clients. To launch J2EE application clients using the launchClient script, perform the following steps:

 

Procedure

  1. Enter the following command to launch J2EE application clients:

    app_server_root/bin/launchClient
    

  2. Pass parameters to the launchClient command or to your application client program as well. The launchClient command allows you to do both. The launchClient command requires that the first parameter is either:

    • An EAR file specifying the application client to launch.

    • A request for launchClient usage information.

    The following example illustrates the command line invocation syntax for the launchClient tool:

    launchClient [-profileName pName | -JVMOptions options | -help | -?] <userapp> [-CC<name>=<value>] [app args]
    
    where

    • userapp is the path and the name of the EAR file that contains the application client.

    • -CC<name>=<value> is the client container name-value pair parameter. See the client container parameters section, for supported name-value pair arguments.

    • app args are arguments that pass to the application client.

    • -profileName defines the profile of the Application Server process in a multi-profile installation. The -profileName option is not required for running in a single profile environment or in an Application Clients installation.

      [AIX] [Linux] [HP-UX] [Solaris]

      [Windows] The default is default_profile.

    • -JVMOptions is a valid Java standard or non-standard option string. Insert quotation marks around the string.

    • -help, -? prints the usage information.

    All other parameters intended for the launchClient command must begin with the -CC prefix.

    Parameters that are not EAR files, or usage requests, or that do not begin with the -CC prefix, are ignored by the application client run time, and are passed directly to the application client program. The launchClient command retrieves parameters from three places:

    • The command line

    • A properties file

    • System properties

    The parameters are resolved in the order listed above, with command line values having the highest priority and system properties the lowest. Using this prioritization you can set and override default values.

  3. Specify the server name.

    [AIX] [Linux] [HP-UX] [Solaris]

    [Windows] By default, the launchClient command uses the localhost for the BootstrapHost property value. This setting is effective for testing your application client when it is installed on the same computer as the server. However, in other cases override this value with the name of your server. You can override the BootstrapHost value by invoking launchClient command with the following parameters:

    launchClient myapp.ear -CCBootstrapHost=abc.midwest.mycompany.com
    
    You can also override the default by specifying the value in a properties file and passing the file name to the launchClient shell.

    Security is controlled by the server. You do not need to configure security on the client because the client assumes that security is enabled. If server security is not enabled, then the server ignores the security request, and the application client functions as expected.

 

Example

You can store launchClient values in a properties file, which is a good method for distributing default values. You can then override one or more values on the command line. The format of the file is one launchClient -CC parameter per line without the -CC prefix. For example:

[Windows]

 verbose=true classpath=c:\mydir\util.jar;c:\mydir\harness.jar;c:\production\G19
\global.jar BootstrapHost=abc.westcoast.mycompany.com tracefile=c:\WebSphere\mylog.txt 
[AIX] [HP-UX] [Linux] [Solaris]

 verbose=true classpath=/usr/lpp/mydir/util.jar;/usr/lpp/mydir/harness.jar;/usr/lpp
/production/G19/global.jar BootstrapHost=abc.westcoast.mycompany.com tracefile=/usr
/lpp/WebSphere/mylog.txt 



launchClient tool

Specifying the directory for an expanded EAR file
[AIX] [Linux] [HP-UX] [Solaris]

[Windows] Java Web Start architecture for deploying application clients
[AIX] [Linux] [HP-UX] [Solaris]

[Windows] Use Java Web Start

 

Related Reference


Application client troubleshooting tips