| Prev | Next | J2EETM Developer's Guide
Clients |
ConverterClient program, a stand-alone Java application. The ConverterClient program is the client for the ConverterApp J2EE application. When you deploy ConverterApp, you select a checkbox labelled "Return client Jar" and then specify ConverterAppClient.jar. This file contains stub classes enabling the client to communicate with the enterprise bean. You include the ConverterAppClient.jar file in the classpath when running the ConverterClient program:
Windows:CPATH=$J2EE_HOME/lib/j2ee.jar:ConverterAppClient.jar:. java -classpath "$CPATH" ConverterClient
For the previous commands to work, theset CPATH=.;%J2EE_HOME%\lib\j2ee.jar;ConverterAppClient.jar java -classpath "%CPATH%" ConverterClient
ConverterClient and the J2EE server hosting the enterprise bean must run on the same machine. If a stand-alone Java application client is to run on a different machine, you must follow these steps:
1. Copy the client .jar file to the same machine where the client program will run.
2. Include the -Dorg.omg.CORBA.ORBInitialHost option when running the client. For example, if your enterprise bean has been deployed on a host named buzz, you would run the client as follows:
Windows:CPATH=.:$J2EE_HOME/lib/j2ee.jar:ConverterAppClient.jar java -Dorg.omg.CORBA.ORBInitialHost=buzz -classpath "$CPATH" ConverterClient
CPATH=.;%J2EE_HOME%\lib\j2ee.jar;ConverterAppClient.jar java -Dorg.omg.CORBA.ORBInitialHost=buzz -classpath "%CPATH%" ConverterClient