NonStop Server for Java 6.0 Programmer's Reference

information about the -Xss option, see java in the NonStop Server for Java 6.0 Tools
Reference Pages.
4. Create a DLL file (.so file type) and specify the linker option -set float type
IEEE_float. Then set the _RLD_LIB_PATH environment variable to point to where the
created DLL file resides by using the following command:
export _RLD_LIB_PATH=dll-path
where dll-path is the directory where the user DLL resides. For more information,
see “_RLD_LIB_PATH” (page 40).
The javahjni demo shows an example of how to create a library file. This demo also shows
converting between the TNS and the IEEE floating point.
Calling Java Methods from C or C++
You can create your own C or C++ program and use the Invocation API to load the JVM into an
arbitrary native program. Be sure to follow these guidelines:
Compile code written in C++ by using the -Wversion2 or -Wversion3 compiler, and the
-WIEEE_float compiler command line options.
The NonStop Server for Java 6.0 provides DLLs. Therefore, you can build your own executable
and link it to the JVM DLL, libjvm.so. For details, see the invocation_api demo provided
with the NonStop Server for Java 6.0 installation.
Do not set signal handlers for the following signals: SIGSEGV , SIGPIPE , SIGCHLD ,
SIGINT , SIGQUIT , SIGTERM ,and SIGHUP .
Set the executable to use IEEE floating point.
NonStop Server for Java 6.0 does not support the signal-chaining facility implemented in some
other vendors' JVMs.
When a program uses the Invocation API to start a JVM, its function returns are parameters of type
float or double that are in IEEE floating-point format. Any parameters of type float or double
that are passed to NonStop Server for Java 6.0 must also be in IEEE floating-point format. If such
a program wants to convert between TNS floating-point format and IEEE floating-point format, the
Guardian Procedure Calls Reference Manual documents a series of procedures with names
beginning with NSK_FLOAT_ that can be used to convert float and double data between the
two formats.
To run the Invocation API demo, follow the instructions for the Invocation API demo in the README
file in the directory /usr/tandem/java/demo/invocation_api.
Linker and Compiler Options
Compiler Options
When you compile C++ source for use with NonStop Server for Java 6.0, you must use the following
compiler options to identify which dialect of the C++ compiler is to be used:
-Wversion2 or-
-Wversion3
In addition, for a compilation unit containing JNI code that has any floating-point parameters being
passed across the JNI boundary and that is directly called by the JVM, you must use the compiler
option:
-WIEEE_float
Any compilation units not called directly by the JVM can be compiled without the WIEEE_float
option; however, the complications that can occur while using such mixed modes are beyond the
Java Native Interface (JNI) 45