Topic
1 reply Latest Post - ‏2006-10-12T14:07:37Z by wff
SystemAdmin
SystemAdmin
504 Posts
ACCEPTED ANSWER

Pinned topic JNI - java.lang.UnsatisfiedLinkError

‏2001-04-06T18:08:38Z |
I checked the library paths: PATH, LIBPATH,
LD_LIBRARY_PATH,
CLASSPATH, and SHLIB_PATH all include my directory. The
path is /usr/lpp/web-data/restricted/ps/cgi-bin and is
included in each path. The C linked module libWsfPrivileges.so
is in that path. Here is the permissions
(755):
/usr/lpp/web-data/restricted/ps/cgi-bin : $ ls -l

total 544

-rwxr-xr-x 1 T9479MJ OMVSUSER 139264 Mar 27 16:01 libHelloWSF.so

-rwxr-xr-x 1 T9479MJ OMVSUSER 1120 Mar 7 10:04 libHelloWSF.x

-rwxr-xr-x 1 T9479MJ OMVSUSER 81920 Mar 27 16:00
libWsfPrivileges.so
-rwxr-xr-x 1 T9479MJ OMVSUSER 1040 Mar 9 15:10
libWsfPrivileges.x

Any other suggestions?
Updated on 2006-10-12T14:07:37Z at 2006-10-12T14:07:37Z by wff
  • wff
    wff
    1 Post
    ACCEPTED ANSWER

    Re: JNI - java.lang.UnsatisfiedLinkError

    ‏2006-10-12T14:07:37Z  in response to SystemAdmin
    Java programming with JNI tutorial. The tutorial apparently worked with Windows and Solaris. I found it on the deveoperWorks site. I'm interested in having Java talk to C++ programs on USS. I keyed in the code so I could test it on USS. Here's the problem I'm having.

    $ c++ -I$JAVA_HOME/include -Wc,"LANG(LONGLONG) DEFINE(_XOPEN_SOURCE_EXTENDED)" -o libSample1.so Sample1.C
    $ java Sample1
    Exception in thread "main" java.lang.UnsatisfiedLinkError: intMethod
    at Sample1.main(Sample1.java:11)

    The c++ command compiles and links. I had to name the dll libSample1. You can see the error I got when I ran the Java code. I have the CLASSPATH and the LIBPATH set to the directory containing the class and dll. Everything is in one directory.

    I have my own application using JNI running on Windows. I ported that application to USS and get similar errors.