tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergio Juan" <>
Subject Re: JNI with Servlets
Date Sat, 05 Jul 2003 10:29:32 GMT

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(""); --> If you include it in
          System.load("/usr/local/lib/");  // --> you don't need to
set LD_LIBRARY_PATH (I think)
     } catch (Exception ex) {
          System.out.println(" Can not load dinamic library. Reason: \n");

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


----- Original Message ----- 
From: <>
To: <>
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 &, 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
> Thanks,
> Jay
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message