Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65EF91165D for ; Thu, 26 Jun 2014 22:21:14 +0000 (UTC) Received: (qmail 22584 invoked by uid 500); 26 Jun 2014 22:21:13 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 22499 invoked by uid 500); 26 Jun 2014 22:21:13 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 22489 invoked by uid 99); 26 Jun 2014 22:21:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2014 22:21:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2014 22:21:15 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 42B431C30; Thu, 26 Jun 2014 22:20:50 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 56676] New: Normalize access to native library Date: Thu, 26 Jun 2014 22:20:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 8 X-Bugzilla-Component: Catalina X-Bugzilla-Version: trunk X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: gael.lalire@laposte.net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: ---- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=56676 Bug ID: 56676 Summary: Normalize access to native library Product: Tomcat 8 Version: trunk Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: gael.lalire@laposte.net Docs seems to advice using $CATALINA_HOME/lib but you could also imagine $CATALINA_HOME/native directory. What I wish is to avoid having a JVM launching with special options (java.library.path). To achieve that you should use System.load and System.mapLibraryName instead of System.loadLibrary. A code sample if $CATALINA_HOME/lib is the normalized native directory: {code} File nativeLib = new File(System.getProperty("catalina.home"), "lib"); for (int i = 0; i < NAMES.length; i++) { try { System.load(new File(nativeLib, System.mapLibraryName(NAMES[i])).getPath()); loaded = true; } {code} It is useful if the tomcat instance is not running at JVM start but embedded and launched later. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org