Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 51162 invoked from network); 27 Jan 2005 07:51:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Jan 2005 07:51:52 -0000 Received: (qmail 80641 invoked by uid 500); 27 Jan 2005 07:51:32 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 80614 invoked by uid 500); 27 Jan 2005 07:51:31 -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 80596 invoked by uid 99); 27 Jan 2005 07:51:31 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtpout.comendo.dk (HELO smtpout.comendo.dk) (195.245.210.77) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 26 Jan 2005 23:51:29 -0800 Received: from smtpscanner.comendo.dk (smtpscanner.comendo.dk [195.245.210.73]) by smtpout.comendo.dk (Postfix) with ESMTP id 8AD03675F31 for ; Thu, 27 Jan 2005 08:50:33 +0100 (CET) Received: from travelstart.se (Not Verified[195.84.144.23]) by smtpscanner.comendo.dk with {MailFence} (v{4.0}) (COMSND) id ; Thu, 27 Jan 2005 08:51:26 +0100 Received: from [10.47.17.204] (account andreas [10.47.17.204] verified) by travelstart.se (CommuniGate Pro SMTP 4.0.6) with ESMTP id 4932115 for tomcat-user@jakarta.apache.org; Thu, 27 Jan 2005 08:43:19 +0100 Message-ID: <41F89DBB.8010507@travelstart.se> Date: Thu, 27 Jan 2005 08:52:27 +0100 From: Andreas Andersson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Using native and ld_library_path References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Caldarale, Charles R wrote: > Yes, except the property name is java.library.path (LD_LIBRARY_PATH is only the environment variable name). The default for Linux systems is /usr/lib:/lib (for UNIX, it's just /usr/lib), so you could put the .so file there. I tried putting all of the files there but still get the same java.lang.UnsatisfiedLinkError when trying to invoke the method. When issuing the command System.out.println(System.getProperties().get("java.library.path")); right before the error occurs I can see the correct folders there. Is there anything else that would differ between running this through tomcat than from prompt? > I think you have to be careful about where the System.loadLibrary() call is issued, since a native library can only be loaded for one class loader. This has implications for sharing the code across applications and for redeploying applications. I never use System.loadLibrary() in the javacode that does work (outside tomcat), do I have to? -- Andreas Andersson IT Dept. Travelstart Nordic andreas@travelstart.se http://www.travelstart.se --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org