NonStop Server for Java 7.0 Programmer's Reference
For more information on using -name option with 32–bit JDK and 64–bit JDK, see “Java process
name” (page 98).
For more information about the run(1) utility, see Open System Services Shell and Utilities
Reference Manual.
Configuring a Java Pathway serverclass
Following is a brief overview of the specific Java requirements for configuring a Java program to
run as a Pathway serverclass. Complete information about the topic is available in the TS/MP 2.5
System Management Manual.
The serverclass attributes that have specific Java requirements follow. Typically, the attribute settings
are available in a configuration file, but the examples show how to set the attributes in the OSS
environment.
ARGLIST
The ARGLIST must be in the form:
-Xabend,class-name[,arguments]
where, [,arguments] is an optional, comma-separated list of arguments that are passed to the
named serverclass.
For example, from the OSS prompt, start a PATHMON (process monitor) named $foo and set the
ARGLIST at the PATHCOM prompt:
$gtacl -p pathcom \$foo
PATHCOM .....
=set serverclass ARGLIST -Xabend,MyClass,3000
This is similar to entering java -Xabend MyClass 3000 at an OSS shell prompt. The -Xabend
argument to the java executable causes java to abend instead of exiting with a non-zero exit
code. Pathway servers must abend rather than merely stop when a fatal error occurs, so that the
PATHMON process can restart them. MyClass is the name of the Java class to be invoked, and
"3000" is an argument to the MyClass class.
NOTE: In the OSS environment, the dollar sign ($) has special meaning; therefore, the process
name $foo must be preceded by a backslash (\), the escape character.
PROCESSTYPE
Set this attribute to OSS.
ENV
Environment variables are set using the ENV serverclass attribute. For Java use, you must set the
CLASSPATH environment variable so that the Java runtime can find your classes. For a CLASSPATH
example, the following set server command is entered at the PATHCOM prompt.
$gtacl -p pathcom \$foo
PATHCOM .....
=set server ENV CLASSPATH=/myclasspath
where, /myclasspath is the location where all the classes are available.
NOTE: JREHOME shell variable need not be set for NSJ7. However, if this variable is set, NSJ7
will accept it. If this variable is set, you must ensure that it points to the correct JDK.
32 Getting started










