Run the J2EE application client

Use the launchClient script to start your J2EE application client. The launchClient script performs these actions:

The launchClient script is included as part of the client runtime support product, and is located in the bin subdirectory. Here are some examples of the default location of the script on various platforms:

You may pass parameters to the launchClient script and, optionally, to your J2EE application client program. See The launchClient script for more information about parameters.

Specifying the server name and server port number

The launchClient script uses the environment variable COMPUTERNAME for the default -CCBootstrapHost property value and 2809 for the default -CCBoostratpPort property value. Use the -CCBootstrapHost property to specify the iSeries host-name where WAS is running. You can also override the -CCBootstrapPort value if you have changed the bootstrap port for your WAS instance.

These values can be overridden by invoking the launchClient script in this way:

launchClient myapp.ear -CCBootstrapHost=host -CCBootstrapPort=port

where host is the host name for your iSeries server and port is the port on which the name service for your application server is listening. The default value for the name service port is 2809.

Note: If you are using JMS resources, specify the -CCsoapConnectorPort=port argument also.

For example:

launchClient myapp.ear -CCBootstrapHost=PRODSVR -CCBootstrapPort=10400

You can also override the default by specifying the value in a properties file and passing the file name to the launchClient script.

Specifying directories for expanded EAR files

Each time the launchClient script is called, it extracts the EAR file to a random directory name in the temporary directory on your hard drive. See Specify the directory for an expanded EAR file for information on how to change this default behavior.

Format of a launchClient properties file

The format of the file is one launchClient -CC parameter per line without the -CC prefix. For example:

   verbose=true
   classpath=c:\mydir\util.jar;c:\mydir\harness.jar;c:\production\G19\global.jar
   BootstrapHost=PRODSVR
   tracefile=c:\WebSphere\mylog.txt

You then specify the name of the properties file using the -CCpropfile property. For example, the following would be the command-line for invoking the launchClient script using a properties file named myproperties.properties:

launchClient -CCpropfile=myproperties.properties

Running a J2EE application client with security enabled

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 security is not enabled, the server ignores the security request, and the J2EE application client works as expected. The sas.client.props file is used for security information. On iSeries, this file is located using the -instance parameter.

For more information, see the following topics:

Tips for migrating J2EE application client code:

If your J2EE application client uses resource references, and you have configured those resources using the Application Client Resource Configuration Tool (ACRCT), run the ClientUpgrade command to migrate the resource configuration information in WAS V5.