--- "Ho, Sam" <[EMAIL PROTECTED]> wrote:

> Hi, All
> My servlet use a DLL, currently the DLL is located
> at window system32 and in the webapp's WEB-INF/lib.
> But I sometimes got the "UnsatisfiedLinkError". Can
> anyone tell me where should the DLL put? and what
> kind of system variable I need to set for the tomcat
> classloader to load the DLL? I am using Window XP
> Pro.
> Any suggestions or Hints, I will be very appreciate!
> 
> Thanks
> Sam
If you are using loadLibrary then you need to have it
on the path which "system32" satisfies.  Putting it
under WEB-INF/lib isn't doing anything for you (if
using loadLibrary).  You could use System.load and get
the exact loacation of the file using the servlet
methods to get the full path and then call that to
load the file directly without leaving it up to path
loading and name matching.  I do this when I want
definite version control over the version of a library
I'm using.  Now, for the UnsatisfiedLinkError, have
you debugged this?  One, debug the java code (you can
run the debugger in tomcat just like other java
applications).  Step to the line or set a break point
and see what other setup maybe isn't getting
initialized when this happens.  Next, but probably
what I would actually do first, debug your C library. 
Setup a breakpoint in the entry point (DllMain) and
see if it is loading or starting to load and maybe
bombing out there......it may be bombing out in some
static section of your DLL before you even get to your
entry point.

Wade

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to