JNI Settings for SGI Machines


                 I am working at the University of Missouri-Columbia for
developing an Interactive Image SpreadSheet application using C++ and the
Qt libraries.  For determining the scope of Java in our project,I was
trying to build some examples of Java Code calling C++ code through the
JNI and C++ code invoking the Java Virtual machine through the invocation
interface, on the SGI machines.
For the Java code calling a native function, i followed the guidelines in
the Sun's tutorial and built the shared library (say, libHello.so)

When I ran the class HelloWorld, I'm getting an error message
"UnSatisfiedLinkError" saying libhello.so is not found in
java.library.path.The directory where libhello.so was there was in the

For the other program, which invokes the Java VM from
Native Code, I tried to compile a C program, invoke.c which calls a Java
class function. 

The following command attempted to compile the invoke.c program

cc -I/usr/apps/java/include -I/usr/apps/java/include/irix
-L/usr/apps/java/lib32/sgi/classic -ljava invoke.c

The Error message is

 ld32: ERROR 33: Unresolved text symbol "JNI_CreateJavaVM" -- 1st
 referenced by invoke.o
       Use linker option -v to see when and which objects, archives and
dsos are loaded.  Sometimes I get a linker error saying ld32: INFO 152:
Output file removed because of error. Undefined Symbolelfelfd


I would like to receive some guidance on getting the JNI settings right so
that I can build these demos. I guess there are some SGI-specific settings
which have to be done.