To run a J2EE application client, you execute the
runclientscript from a command-line prompt.
Syntaxrunclient -client <appjar> [-name <name>] [-textauth] [app-args]
Table B-5 runclient Options Option
The J2EE application EAR file
The display name of the J2EE application client component
Causes the client container to prompt for the user name and password are from the command line, not from a pop-up window
Any arguments required by the J2EE application
Before executing the
runclientcommand, you must set the
APPCPATHenvironment variable to the name of the client JAR stub file that is generated during deployment. The following example shows how to set
APPCPATHon a Windows machine. The
runclientcommand that follows launches a client named
FabulousClient. The J2EE application of this client resides in the
FabulousApp.earfile.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
runclientyou must do the following:
- 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
runclientscript. You do not need to start the J2EE server on the client's machine.
- Copy the EAR file to the remote client's machine.
- Copy the client JAR stub file to the remote client's machine.
- Set the
APPCPATHenvironment variable to the name of the client JAR stub file.
- Set the
VMARGSenvironment variable to the following value:-Dorg.omg.CORBA.ORBInitialHost=
- For example, if the remote host were named
murphy, you would set the
VMARGSvariable 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
VMARGSenvironment variable to the following value:-Dj2eelogin.name=guest -Dj2eelogin.password=guest123