NonStop Server for Java (NSJ) Tools Reference Pages (NSJ 2.0+)

NSJ Tools Home Page
javah: C Header and Stub File
Generator
The javah tool generates C header files and stub C source files from a Java class.
These files provide the connections that allow your Java
TM
and C code to interact.
For a complete description of the tool and its use, see the Sun Microsystems
documentation for javah.
Synopsis
javah [ options ] classname ...
Compaq Extensions to Standard Java
NonStop
TM
Server for Java adds the following options to javah:
-l stubfile
This option creates stubs specific to Compaq. This option is required only if
your JNI library will contain object files with duplicate names (for example,
two files named trace.o); however, you can also use this option to reduce
the size of the compiled Java Virtual Machine (JVM) code.
If you use this option, you must ensure that the resulting stub file name ends
in _dlsym.c. The stub file name ends in _dlsym.c by default if you use
the -jni option, but if you use the -stubs option, you must also use the
-o option to give the stub file a name that ends in _dlsym.c; for example:
-l mylib -stubs -o mylib_dlsym.c
To reduce the size of the compiled JVM code, follow these steps:
Use the -l option to produce a stubfile_dlsym.c file (as in the
preceding example).
1.
Put the stubfile_dlsym.o in your library.2.
Use the /usr/tandem/java/install/Makefile to relink the
JVM.
3.
The Makefile links the stubfile_dlsym.o file with the JVM, and
the linker links only those files in the library that are needed to resolve
unresolved external references.