NonStop Server for Java 7.0 Programmer's Reference

Creating larger or additional swap file
HP recommends that the swap file size must be equal to the physical memory size, for each
processor that runs the Java virtual machine (JVM). If you plan to run multiple large processes in
the same processor, you might need to create additional swap files because processes running in
the same processor share the same swap file.
Your system administrator can use the NSKCOM tool to create additional swap files.
To add swap files, you must log on to your NonStop operating system as a super.super user. Then,
from the Guardian TACL prompt, run the NSKCOM tool. From the NSKCOM tool, use the help
add and help start commands to get more information. For further information, see Kernel-Managed
Swap Facility (KMSF) Manual.
NOTE: When using the large Java heap feature provided by 64–bit NSJ7, HP recommends that
a contiguous block of Kernel-managed swap space that is at least greater than the Java heap size
be available.
Setting environment variables
The following topics describe the variables that define the environment in which Java operates:
PATH
The environment variable PATH enables Open System Services (OSS) to find the Java executable
files. Add the absolute path of the bin directory to the PATH environment variable.
To add the absolute path, use the following command:
For 32–bit NSJ7:
export PATH=/install_dir/nssjava/jdk170_h70/bin:$PATH
For 64–bit NSJ7:
export PATH=/install_dir/nssjava/jdk170_h70/bin/oss64:$PATH
where, install_dir is the directory in which the NSJ7 is installed. By default, this is
/usr/tandem/nssjava/jdk170_h70.
The PATH shell variable must be created in each shell in which you plan to run java or one of its
tools. For this reason, it is a good idea to set the PATH in the .profile file in your home directory
that is executed each time you logon to an OSS shell. For more information on how to set the PATH
in your startup file, see Open System Services User's Guide.
CLASSPATH
The class search path (class path) is the path where the Java run time environment searches for
classes and other resource files. The class path notifies the JDK tools and applications to find
third-party and user-defined classes. The class path is set either by using the -classpath option
when calling a JDK tool (such as, java or javac), or by setting the CLASSPATH environment
variable.
The preferred method is using the -classpath option because you can set that option individually
for each application without affecting other applications and without other applications modifying
the option's value.
NOTE: You can use either classpath or cp option on the command line. Both the options
are valid.
Syntax
jdkTool -classpath classpath1:classpath2...
-or-
24 Installation and configuration