NonStop Server for Java 7.0 Programmer's Reference
When GraphicsEnvironment.isHeadless returns true, and if your Java programs use classes
and methods that require a display, keyboard, sound, or mouse operation, the class or method
throws a HeadlessException. This value is always true in NSJ7.
Classes and methods that support printing, fonts, and imaging are fully supported in a headless
JVM.
While the Oracle documentation for the reference implementation states that you must set the
system property –Djava.awt.headless=true to run a headless JVM, setting this system property
is not required for NSJ7.
Additional files
In addition to the standard Java packages, NSJ7 provides the following files:
• jtatmf.jar
File containing classes for the version of NonStop Java Transaction Agent that uses TMF. For
more information, see “Transactions” (page 82).
• javachk
The Java Checker program, which determines whether a problem with the JVM is caused by
an incorrect TCP/IP configuration.
Additional environment variable
NSJ7 contains an implementation-specific environment variable that you can use to control the
runtime environment. The JAVA_PTHREAD_MAX_TRANSACTIONS environment variable specifies
the maximum number of TMF transactions allowed per process. The default number of transactions
allowed are 200. For more information, see “Controlling maximum concurrent transactions”
(page 82).
Java native interface (JNI)
The Oracle Java Native Interface (JNI) standard defines the C language APIs that enable Java
routines to call C and C++ routines. JNI defines the way that these routines can start and interact
with a Java Virtual Machine (JVM). It also allows you to load the JVM into native applications to
integrate Java functionality with native applications.
NSJ7 supports JNI and Invocation API with the following modifications:
• Set the _RLD_LIB_PATH environment variable to point to the User DLL location.
export _RLD_LIB_PATH=dll-path[:dll_pathn]...
where, dll-path and dll-pathn are the User DLL directories.
For example, if the user DLLs are in the directory /home/mydll
export _RLD_LIB_PATH=/home/mydll
• NSJ7 supports only the POSIX User Thread library (PUT). As a result of this, additional migration
considerations arise while migrating threaded native code to NSJ7. There are two kinds of
native applications that require changes:
1. Applications that dynamically load libjvm.so and invoke JVM using Invocation APIs.
For more information, see “Calling Java methods from C or C++” (page 37).
2. Applications that use Pthread library to create multi-threaded application. For more
information, see “Threading considerations for native code” (page 43).
• If native C or C++ routines invoke Transaction Management Facility (TMF) calls, you must use
TMF transaction jacket routines defined in “TMF Transaction Jacket Routines” in the “Using
Additional files 35










