Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 68656 invoked from network); 7 Jul 2003 07:02:35 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 7 Jul 2003 07:02:35 -0000 Received: (qmail 26061 invoked by uid 97); 7 Jul 2003 07:05:12 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 26054 invoked from network); 7 Jul 2003 07:05:12 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 7 Jul 2003 07:05:12 -0000 Received: (qmail 67238 invoked by uid 500); 7 Jul 2003 07:02:20 -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 67225 invoked from network); 7 Jul 2003 07:02:20 -0000 Received: from unknown (HELO gridsystems.com) (194.179.36.183) by daedalus.apache.org with SMTP; 7 Jul 2003 07:02:20 -0000 Received: from thalassa (47.Red-80-36-214.pooles.rima-tde.net [80.36.214.47]) by gridsystems.com (8.12.6/8.12.6) with SMTP id h67704TB016301 for ; Mon, 7 Jul 2003 09:00:05 +0200 (MET DST) Message-ID: <000001c34455$c395cff0$4f00000a@thalassa> From: "Sergio Juan" To: "Tomcat Users List" References: <8e1908c919.8c9198e190@optonline.net> Subject: Re: JNI with Servlets Date: Sat, 5 Jul 2003 12:29:32 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: 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 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: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org