creating .so for JNI app on redhat 4
Problem with jni / lib.so creation on RedHat 64
--------------------------------------------------------------------------------
In an attempt to port my real-world app from AIX to Linux, i have digressed into trying
to get a "helloworld" jni program running. My problem is the creation of the .so. When the java program runs, i get the standard:
"Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/ill/test2/libctree.so:
/usr/ill/test2/libctree.so: cannot open shared object file: No such file or directory"
I realize it actually finds the file, but has an issue with it. my compile/link for
the .so looked like this orginally:
javac HelloWorld.java
javah -jni HelloWorld
gcc -shared -fpic -I/APP/java/j2sdk1.4.2_10/include ctree.c -o libctree.so
My LD_LIBRARY_PATH is:
/usr/ill/test2:/usr/lib:/lib64:/lib64/tls:/home/infauser/esreporting/extraction_toolkit:/opt/IBM/db2/V8.1/lib:/opt/informatica/repositoryserver:/opt/informatica/server:.:/files/esrdbo/sqllib/lib
When i do a ldd <.soname> i get:
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95659000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)
What else am i missing: i am using java 1.4.2_10 (32 bit) on redhat version 4 (64 bit) on
an ibm xseries
Insight much appreciated!!!
|