tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <Robert.Pri...@bentley.com>
Subject RE: how do I load a native library?
Date Mon, 24 Jun 2002 17:07:09 GMT
Unless I am missing something, it looks like it should work.

is "mapscript" the name of your dll?

Is "mapscript.dll" in your PATH?

-----Original Message-----
From: Andreas Hirner [mailto:andreas@projektinter.net]
Sent: Monday, June 24, 2002 1:08 PM
To: Tomcat Users List
Subject: how do I load a native library?


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>

--
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