HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

Sample Java CPI-C Transaction Program
Compiling, Linking, and Running the Sample Program
Chapter 5328
Compiling, Linking, and Running the Sample
Program
After examining the source code for JPing, you may want to build and
test the program.
Before compiling and linking the application, specify the directory where
Java classes are stored. To do this, set and export the environment
variable CLASSPATH to /opt/sna/java/cpic.jar.
To compile and link the program, take the following steps.
Step 1. Copy the file JPing.java from the directory /opt/sna/samples to a
private directory.
Step 2. From the private directory, compile and link the application using the
Java compiler javac in the normal way, using the following command:
javac JPing.java
You should see that the file JPing.class has been generated.
Before running the application, specify the directory where libraries are
stored, so that the applicatio n can find them at run time. To do this, set
and export the environment variable SHLIB_PATH to /opt/sna/lib.
You may also need to set and export the APPCTPN environment variable
to specify the local TP name for the application, as described in
“Specifying the Local TP Name” in Chapter 2.
Running the program involves updating the SNAplus2 configuration to
include a symbolic destination name identifying the partner LU. This
task is usually performed by the System Administrator. The following
steps are required:
For Symbolic Destination Name, specify JPING.
For Partner TP Name Type, specify Application Program.
For Partner TP Name, specify APINGD.
For Partner LU, specify the fully-qualified name of the partner LU
you want to contact.
For Mode Name, specify #INTER.