Hi.

Have you linked the library (the best place to do it is at the init(), as
you can only link it once)? The code is something like this

  public void init () {
    try {
      //System.loadLibrary("myLib.so"); --> If you include it in
LD_LIBRARY_PATH
          System.load("/usr/local/lib/myLib.so");  // --> you don't need to
set LD_LIBRARY_PATH (I think)
     } catch (Exception ex) {
          System.out.println(" Can not load dinamic library. Reason: \n");
          ex.printStackTrace();
        }
    }

If you already do it please show your code so the group can help better.

Regards?

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 05, 2003 2:25 AM
Subject: JNI with Servlets


> I'm attempting to use a shared library on Linux thats called from a
servlet that I have deployed on Tomcat 4.1.18.  Everytime I try to use the
servlet it throws an exception with an unsatisfiedlinkerror.  I've added
LD_LIBRARY_PATH=/usr/lib to my catalina.sh & startup.sh, modified the
classpath to include the .so, and copied the .so to server/lib, common/lib
and nothing seems to be working.
>
> Might anyone have some hints or simple examples of how to get this
working?
>
> Thanks,
>
> Jay
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to