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

For more information about the run(1) utility, see the Open System Services Shell and
Utilities Reference Manual.
Configuring a Java Pathway
Serverclass
The 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 System Management Manual.
The serverclass attributes that have specific Java requirements follow. Typically, the attribute
settings would be put in a configuration file, but the examples here show setting them in the
OSS environment.
ARGLIST
The ARGLIST should appear as follows:
-Xabend,class-name[,arguments]
where [,arguments] is an optional, comma-separated list of arguments that are to be
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 if an uncaught
exception occurs. 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 that, 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 run-time can find your
classes. Additionally, if you are running java executable in a location other than the
standard location of /usr/tandem, you must set the JREHOME environment variable
to the jre directory. For a JREHOME example, the set server command shown entered at
the PATHCOM prompt follows. (However, you would typically type these commands in