The J2EETM Tutorial
Home
TOC
Index
PREV TOP NEXT Search
Feedback

runclient Script

To run a J2EE application client, you execute the runclient script from a command-line prompt.

Syntax

runclient -client <appjar> [-name <name>]	
[-textauth] [app-args]
 

Table B-5 runclient Options 
Option
Description
-client <appjar>
The J2EE application EAR file
-name <name>
The display name of the J2EE application client component
-textauth
Causes the client container to prompt for the user name and password are from the command line, not from a pop-up window
<app-args>
Any arguments required by the J2EE application

Example

Before executing the runclient command, you must set the APPCPATH environment variable to the name of the client JAR stub file that is generated during deployment. The following example shows how to set APPCPATH on a Windows machine. The runclient command that follows launches a client named FabulousClient. The J2EE application of this client resides in the FabulousApp.ear file.

set APPCPATH=FabulousAppClient.jar	
runclient -client FabulousApp.ear -name FabulousClient
 

Accessing a Remote Server

If the J2EE application client will reside on a different machine than the J2EE server, before executing runclient you must do the following:

  1. Install the J2EE SDK on the remote client's machine. The SDK must be on the client's machine so that you can run its runclient script. You do not need to start the J2EE server on the client's machine.
  2. Copy the EAR file to the remote client's machine.
  3. Copy the client JAR stub file to the remote client's machine.
  4. Set the APPCPATH environment variable to the name of the client JAR stub file.
  5. Set the VMARGS environment variable to the following value:
       -Dorg.omg.CORBA.ORBInitialHost=<remote-host>
     
    

For example, if the remote host were named murphy, you would set the VMARGS variable on a Windows machine as follows:

   set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=murphy
 

Preventing the User Name and Password Prompts

During iterative development, you may find it convenient to prevent the client container from prompting for the user name and password. To prevent these prompts, set the VMARGS environment variable to the following value:

-Dj2eelogin.name=guest -Dj2eelogin.password=guest123
 
Home
TOC
Index
PREV TOP NEXT Search
Feedback