NonStop Server for Java 6.0 Programmer's Reference

will not have to reinstall user-provided JAR files for new product releases of NonStop Server for
Java 4. You, however, have to place the JAR files in your CLASSPATH.
Dynamic Link Libraries (DLLs)
On the TNS/E platform, NonStop Server for Java 4 , 5, 5.1, and 6.0 support Dynamic-Link Libraries
(DLLs). All NonStop Server for Java applications migrating from TNS/R to TNS/E must convert
native libraries to DLLs.
Consider these issues when migrating applications to use DLLs with the NonStop Server for Java
6.0:
All the Java libraries are built as DLLs.
When using the JNI code, use DLLs instead of static libraries. For further information, see “Java
Native Interface (JNI)” (page 43). A public library directory does not apply for Java applications
on the TNS/E platform.
All DLLs must be in the files that have specific naming requirements. For further information
see DLL names.
On TNS/E, the -Dcompaq.liblist option is not supported.
The customer Makefile no longer exists in the NonStop Server for Java 4 , 5, 5.1, and 6.0
on TNS/E because DLL support precludes the need to bind user native code into the java
executable.
The _RLD_LIB_PATH environment variable, used only on the TNS/E platform, specifies the
library path for user DLLs. For further information, see “_RLD_LIB_PATH” (page 40) (TNS/E
Only).
The invocation API uses the JVM as a DLL; therefore, if you use this API, you do not need to
statically link Java into your programs.
Makefile to Link Native Libraries
The customer Makefile no longer exists for NonStop Server for Java 4 , 5, 5.1, and 6.0 on TNS/E
because DLL support precludes the need to bind user native code into the java executable. For
information about migrating native libraries, see “Dynamic Link Libraries (DLLs)” (page 82).
Compiling C++ Native Code with the -Wversion3 Option
For TNS/E, you can use C++ code compiled using either a dialect of version 2 or version 3 for
user DLLs because the NonStop Server for Java 4 , 5, 5.1, and 6.0 on TNS/E is built with a C++
version neutral flag (the -setCPlusPlusDialect neutral option for the linker).
If you are migrating NonStop Server for Java applications based on JDK 1.3.x or earlier, you
might need to change your source code. Whether your native code needs source-code changes
depends on whether the code uses C++ features that have changed in version 3. To identify
required source-code changes, run a migration check on your source code on TNS/R by invoking
the version 2 compiler and using the pragma MIGRATION_CHECK. Running this migration check
causes the compiler to issue a warning when a class or member function is present that has changed
or become obsolete for version 3. See the C/C++ Programmers Guide for more information about
this pragma and the warnings it can produce.
Note that the VERSION3 directive specifies the use of the Standard C++ Library ISO/IEC version
3 and the C++ Standard headers. VERSION3 enforces the ISO/IEC IS 14882:1998 standard for
C++. The ISO C++ standard is identical to the ANSI C++ standard.
For invocation API users, you build your own executable and link that executable against the JVM
DLL. For a demo, see the invocation API demo provided by NonStop Server for Java 6.0 in
install_dir/demo/invocation_api.
For more information, see “Linker and Compiler Options (page 45).
82 Migrating Applications