tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Hirner" <andr...@projektinter.net>
Subject how do I load a native library?
Date Mon, 24 Jun 2002 17:08:08 GMT
Hi,

I would like to load a native library for all applications in the
common/lib directory.
So I wrote the following code:

 public class InitMapserver
 {
   static
  {
     try {
        System.loadLibrary("mapscript");
        System.err.println("libmapscript.so loaded");
     } catch (UnsatisfiedLinkError e) {
        System.err.println("libmapscript.so not loaded: " + e);
     }
   }
 }

then I created a jar file and copied it into the common/lib directory.
After restarting tomcat, I called the class in a servlet using the
Class.forName method. Unfortunately this does not work.

What did I wrong?

Thanks Andreas



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message