NonStop Server for Java Programmer's Reference (NSJ 4.2+)

the system. When you unpax a NonStop Server for Java 4 pax file, the symbolic link is created or
reset to refer to the JDK directory that is being unpaxed, which means that the symbolic link refers
to the version of NonStop Server for Java 4 that was last installed. You are not required to use the
symbolic link. To make sure you are always using the 1.4.2 version of the JDK, even if a later
version has been installed, you can put /usr/tandem/nssjava/jdk142_v20/bin on your
PATH. You can also reset the symbolic link yourself by using the ln command with the -s option.
For example, if you install a PVU based on version 1.3.1 of the JDK, but still want version 1.4.2 to
be the one referred to by /usr/tandem/java, you can reset the symbolic link instead of
unpaxing version 1.4.2 again:
$ cd /usr/tandem
$ rm java
$ ln -s /usr/tandem/nssjava/jdk142_v20 java
The symbolic link is always put in the directory where NonStop Server for Java 4 is installed, so if
you use the -s option to specify an alternative installation directory during the unpaxing step, the
symbolic link is install_dir/java instead of /usr/tandem/java. For example, if
nssjava/jdk142_v20 is installed in /h/myjava, the symbolic link is /h/myjava/java,
and this symbolic link points to the directory /h/myjava/nssjava/jdk142_v20.
Binding Libraries into the JVM
To establish an environment that permits the use of servlets and similar clients with native code,
you must bind the appropriate libraries into the JVM. To bind the libraries, use
install_dir/java/install/Makefile. By default, this Makefile relinks java with
any libraries in the directory install_dir/java_public_lib_jdk142.
Except for native library files associated directly with NonStop Server for Java 4, HP recommends
that native library files not be installed in the NonStop Server for Java 4 directory tree. Any Java
based products supplying such libraries should also supply an installation script that will run the
"customer makefile" specifying the location of the native libraries for the CUSTLIB_DIRS variable.
Using the Makefile to Link in Native Libraries
The Makefile in the install_dir/java/install directory provides these functions:
Allows for the periodic submission of new library files that need to be bound into the java
executable.
Runs the SQL compiler to compile the java executable so that JDBC Driver for MP can be
used to access SQL/MP tables.
For the submission of new libraries, you can provide libraries in either of these formats:
An archive of object files in a file ending in .a
A relinkable collection of object files in a file ending in .lib (which is the preferred
method)
The following topics describe using the Makefile: