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.lal...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to