Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 34196 invoked from network); 24 Jun 2002 17:09:37 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Jun 2002 17:09:37 -0000 Received: (qmail 14353 invoked by uid 97); 24 Jun 2002 17:09:23 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 14337 invoked by uid 97); 24 Jun 2002 17:09:23 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 14323 invoked by uid 98); 24 Jun 2002 17:09:22 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <93C0BE6A6D6AD211BC7400A0C9D8FE8705A366B6@exton1.bentley.com> From: Robert Priest To: 'Tomcat Users List' Subject: RE: how do I load a native library? Date: Mon, 24 Jun 2002 13:07:09 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: