NonStop Server for Java 7.0 Programmer's Reference
NonStop operating system does not provide support for windowing operations, NonStop Server
for Java 3.1.x or earlier versions 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 throws an UnsupportedClassException.
NSJ7 supports the Oracle's 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.
Oracle implemented headless support by supplying two new methods in the
GraphicsEnvironment class: is Headless and is HeadlessInstance. In addition, Oracle
created a new exception java.awt.HeadlessException. HeadlessException, which is
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 NSJ versions 4, 5, 5.1, 6.0, and 7.0.
For more information, see “Headless support” (page 34).
POSIX threads
NSJ 3.1.x and earlier versions used OSS POSIX Threads (product number T5819) that conformed
to an earlier standard for POSIX threads. NSJ versions 4, 5, 5.1, and 6.0 use the Standard POSIX
User Threads (product number T1248) library referred as the SPT model library. Whereas, NSJ
version 7 uses POSIX User Threads (product number T1280) referred as PUT model library.
The Pthreads function provided by the PUT model library comply with the IEEE Std 1003.1, 2004,
POSIX System Application Program Interface. Therefore any native code that makes Pthread calls
might have to change. For more information, see chapter Using the POSIX User Thread (PUT) Model
Library in Open System Services Programmer's Guide.
Additionally, you must change any JNI code that made calls to routine beginning with cma..
supplied with T5819 or spt... supplied with T1248 to use the Wrapper or Development Toolkit
routines (put..) supplied with T1280.
For information about changes needed to migrate threaded applications to NSJ7, see “Threading
considerations for native code” (page 43).
Directories of binary files moved
If your NonStop Server for Java programs have references to bin/oss/posix_threads in
Pathway configuration files or elsewhere, you must change them to use the NSJ7 installation bin
directory.
In NSJ 3.1.x or earlier versions, the bin and jre/bin directories contained a shell script that
ran the real executable located in bin/oss/posix_threads. In NSJ7 version, the bin directory
contains the real executable, no shell script wrapper, and no bin/oss/posix_threads directory
are present. The jre/bin directory contains the executables in the bin directory.
JAAS enhancement
In NSJ 3.x and earlier versions, the JAAS was an optional package (extension). It is integrated
with NSJ7. JAAS augments the core Java 2 platform with APIs that allow authenticating and
enforcing access controls on users. Traditionally, Java 2 provided code-source-based access controls
(access controls based on where the code originated and who signed the code). However, Java
2 lacked the ability to additionally enforce access controls based on who runs the code. In NSJ7,
JAAS provides a framework that augments the Java 2 security architecture with this additional
capability.
For more information on JAAS, see “Java authentication and authorization service” (page 46).
Summary of migration changes 95










