[374] in java-interest
Re: Linking Shared Libraries
daemon@ATHENA.MIT.EDU (Jim Graham)
Fri Jun 16 18:30:07 1995
Date: Fri, 16 Jun 1995 15:07:34 -0700
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: java-interest@java.Eng.Sun.COM, ebeling@igd.fhg.de
Hi Pascal,
> Following the steps in the documentation on implementing native methods
> I created a shared library and linked it with the Linker.loadLibrary
> method. The LD_LIBRARY_PATH variable contains the correct path but I'm
> still getting a UnsatisfiedLinkException when I call the native method.
> What else could be the reason for this??
If the error is occuring at "Linker.loadLibrary" time, then there have
already been a number of good suggestions about why this might be - the
debug interpreter looks for libraries with a _g.so suffix, for instance.
But, if the error is occuring when you actually call a native method, then
there could either be a problem with using the incorrect name for the
method (package_name_MethodName() and case sensitive) or your C function
could be calling a function in a library that it was linked against when
the shared library was created, but which is not in the LD_LIBRARY_PATH
at runtime...
...jim
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com