CORBA 2.6.1 Getting Started Guide for Java
Chapter 6. Running JORB Lite
Chapter 6. Running JORB Lite
Building and Running the Stack Example
Building the Stack Example
Running the Stack Example
Calling NonStop CORBA Applications from JORB Lite
Running Clients and Servers on Remote Machines
After you have installed JORB Lite, you can test your system setup by running one of the examples supplied with the JORB Lite package.
Building and Running the Stack Example
To build and run the JORB Lite Stack example, open two DOS command-prompt windows. In each window, navigate to the javasamples/stack
directory.
The Stack example includes several batch (
.BAT) files to help you build and run of the Stack example:
Stack Example Files for JORB Lite
Name Description
make.bat
This file generates the Java Language Mappings files from the stack.idl interface and builds the client
applications and server applications.
runclient.bat
This file runs the client Java progam.
runserver.bat
This file runs the server Java program.
runserverpoa.bat
This file runs the server Java program using a POA server.
In addition to these batch files, the Stack example also uses the file lib\lite.dbm, a text file that provides the configuration database for the
JORB Lite environment.
Building the Stack Example
Follow these steps to build the client and server applications:
1. Open a command-prompt window, and navigate to the JORB Lite Stack example directory.
2. Run the
make.bat file to generate the Stack Java files and build the client and server applications.
3. Modify the
lib\lite.dbm file by referring to your host name or IP address and a port number in the file.
Running the Stack Example
You have now built the Stack client and server applications and are ready to test your JORB Lite system:
1. Open a second command-prompt window. In this window, navigate to the Stack example directory.
2. In the first command-prompt window, execute the Stack server program by running the
runserver.bat file. (Note that you can also run
the
runserverpoa.bat file to run the POA implementation.)
3. From the second command-prompt window, execute the Stack client by running the
runclient.bat file.
If you you receive the following error, check that you have entered the values into the
lib\lite.dbm file and that you have set up your
environment correctly:
ERROR: Cannot find configuration database
Please verify that -ORBlitedbm <db> was specified in the argument to
The client should run and produce the following output:
Top: 100
Top: 200
Top: 300
Top: 400
Top: 500
Top: 600
Top: 700
Top: 800
Top: 900
Top: 1000