NonStop Server for Java 4.2 Programmer's Reference
Using AWT Classes
If your Java programs use AWT classes with NonStop Server for Java 3.1.x or earlier versions , change
your program code to catch a HeadlessException rather than an
UnsupportedClassException.
Because the NonStop operating system does not provide support for windowing operations, previous
versions of NonStop Server for Java supported only those Abstract Windowing Toolkit (AWT) classes
and methods that did not require a display, keyboard, sound, or mouse operation. Any class or method
that required such an operation threw an UnsupportedClassException.
NonStop Server for Java 4 supports the Sun Microsystems enhancement to AWT called "headless
support" that allows a JVM to indicate whether a display, keyboard, sound, or mouse operation can be
supported in a graphics environment.
Sun implemented headless support by supplying two new methods in the GraphicsEnvironment
class: isHeadless and isHeadlessInstance. In addition, Sun created a new exception
java.awt.HeadlessException. HeadlessException will be thrown by any class or method that
requires a display, keyboard, sound, or mouse operation if such a class or method is invoked when
GraphicsEnvironment.isHeadless returns true. Classes and methods that support printing,
fonts, and imaging are fully supported in a headless JVM and are fully supported by NonStop Server for
Java 4.
For further information, see Headless Support in the HP Implementation specifics section.
POSIX Threads
NonStop Server for Java 3.1.x and earlier versions used OSS POSIX threads (product number T5819)
that conformed to an earlier standard (Draft 4) for POSIX threads. Versions 1 and 2 of NonStop Server
for Java use Standard POSIX Threads (product number T1248), which conforms to IEEE POSIX
Standard 1003.lc.
The use of T1248 by NonStop Server for Java 4 introduces a system dependency on G06.20 or later.
The POSIX threads calls in T1248 have changed to conform to the standard; therefore, any native code
for NonStop Server for Java 3.1.x applications that makes POSIX threads calls might have to change to
use the standard pthread routine. For more information, see Appendix D in the Open System Services
Porting Guide, which contains a list of differences between the POSIX thread routines in T5819 and the
routines in T1248.
Additionally, you must change any JNI code that made calls to routines beginning with cma… to use the
Wrapper or Development Toolkit routines (spt….) supplied with T1248.
NOTE: Any user-developed code that makes such POSIX threads calls must change.