You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by is...@apache.org on 2018/10/17 20:19:26 UTC

svn commit: r1844162 - /tomcat/trunk/java/org/apache/tomcat/jni/Library.java

Author: isapir
Date: Wed Oct 17 20:19:26 2018
New Revision: 1844162

URL: http://svn.apache.org/viewvc?rev=1844162&view=rev
Log:
Updated JavaDoc for r1844065

Modified:
    tomcat/trunk/java/org/apache/tomcat/jni/Library.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Library.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Library.java?rev=1844162&r1=1844161&r2=1844162&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Library.java Wed Oct 17 20:19:26 2018
@@ -256,9 +256,17 @@ public final class Library {
     }
 
     /**
-     * Calls System.load(filename). Using this method will load the
-     * native library via the Common ClassLoader so that it can
-     * be used by all of the Webapps
+     * Calls System.load(filename). System.load() associates the
+     * loaded library with the class loader of the class that called
+     * the System method. A native library may not be loaded by more
+     * than one class loader, so calling the System method from a class that
+     * was loaded by a Webapp class loader will make it impossible for
+     * other Webapps to load it.
+     *
+     * Using this method will load the native library via a shared class
+     * loader (typically the Common class loader, but may vary in some
+     * configurations), so that it can be loaded by multiple Webapps.
+     *
      * @param filename - absolute path of the native library
      */
     public static void load(String filename){
@@ -266,9 +274,17 @@ public final class Library {
     }
 
     /**
-     * Calls System.loadLibrary(libname). Using this method will the
-     * native library via the Common ClassLoader so that it can
-     * be used by all of the Webapps
+     * Calls System.loadLibrary(libname). System.loadLibrary() associates the
+     * loaded library with the class loader of the class that called
+     * the System method. A native library may not be loaded by more
+     * than one class loader, so calling the System method from a class that
+     * was loaded by a Webapp class loader will make it impossible for
+     * other Webapps to load it.
+     *
+     * Using this method will load the native library via a shared class
+     * loader (typically the Common class loader, but may vary in some
+     * configurations), so that it can be loaded by multiple Webapps.
+     *
      * @param libname - the name of the native library
      */
     public static void loadLibrary(String libname){



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org