Re: shared object file - UnsatisfiedLinkError



On 31 May 2007 08:20:28 -0700, K.Fawcett wrote:
I am getting a "java.lang.UnsatisfiedLinkError"

Use nm to see what symbols the file really contains. They shouldn't be
mangled, and if they are, the file probably can't be used with JNI as
is. Java has its own specific opinions about symbol naming.

Also, the shared library must exist in a "real" file system, it isn't
sufficient that it exists in a jarfile that belongs to the
application. My guess is that the java code copies the .so out from
the jarfile in order to load it, and that the number is used to make
the filename unique (it could be the process id).

Why don't you simply ask the customer who provided the file these
things? Or at least post the exact, complete error message you got
(hint: cut and paste, don't paraphrase).

/gordon

--
.



Relevant Pages

  • Re: Allocating an array of pointers
    ... > I AM calling a native function, and I know about the JNI interface. ... It uses those pointers to know where the data is that it is working ... accompanies a Java class with a member variable of type "int" which I've ... Java code, so that each entry could contain a single pointer. ...
    (comp.lang.java.help)
  • Re: debugging JNI application
    ... Are there any integrated tools to debug JNI ... application, which could go through Java code into C code, and vice versa? ...
    (comp.lang.java.help)
  • Re: jni and pointers
    ... > returns a pointer which the java code can then pass back to another ... I thought about casting the pointer to an int ... jni does not seem to ... java long instead of an int just to be on the safe side. ...
    (comp.lang.java.programmer)
  • jni and pointers
    ... I want to use jni to have my java code call a C function which returns a ... pointer which the java code can then pass back to another C function ... I thought about casting the pointer to an int before returning ... Mark ...
    (comp.lang.java.programmer)