--- old/src/share/classes/java/lang/Runtime.java 2013-03-05 17:15:27.741610203 -0500 +++ new/src/share/classes/java/lang/Runtime.java 2013-03-05 17:15:26.509540491 -0500 @@ -749,10 +749,21 @@ public native void traceMethodCalls(boolean on); /** - * Loads the specified filename as a dynamic library. The filename - * argument must be a complete path name, + * Loads the native library specified by the filename argument. The filename + * argument must be an absolute path name. * (for example * Runtime.getRuntime().load("/home/avh/lib/libX11.so");). + * + * If the filename argument, when stripped of any platform-specific library + * prefix, path, and file extension, indicates a library whose name is L, + * and a native library called L is statically linked with the VM, then the + * JNI_OnLoad_L function exported by the library is invoked rather than + * attempting to load a dynamic library. A filename matching the argument + * does not have to exist in the file system. See the JNI Specification + * for more details. + * + * Otherwise, the filename argument is mapped to a native library image in + * an implementation-dependent manner. *

* First, if there is a security manager, its checkLink * method is called with the filename as its argument. @@ -769,7 +780,10 @@ * @exception SecurityException if a security manager exists and its * checkLink method doesn't allow * loading of the specified dynamic library - * @exception UnsatisfiedLinkError if the file does not exist. + * @exception UnsatisfiedLinkError if either the filename is not an + * absolute path name, the native library is not statically + * linked with the VM, or the library cannot be mapped to + * a native library image by the host system. * @exception NullPointerException if filename is * null * @see java.lang.Runtime#getRuntime() @@ -793,12 +807,16 @@ } /** - * Loads the dynamic library with the specified library name. - * A file containing native code is loaded from the local file system - * from a place where library files are conventionally obtained. The - * details of this process are implementation-dependent. The - * mapping from a library name to a specific filename is done in a - * system-specific manner. + * Loads the native library specified by the libname + * argument. The libname argument must not contain any platform + * specific prefix, file extension or path. If a native library + * called libname is statically linked with the VM, then the + * JNI_OnLoad_libname function exported by the library is invoked. + * See the JNI Specification for more details. + * + * Otherwise, the libname argument is loaded from a system library + * location and mapped to a native library image in an implementation- + * dependent manner. *

* First, if there is a security manager, its checkLink * method is called with the libname as its argument. @@ -823,7 +841,10 @@ * @exception SecurityException if a security manager exists and its * checkLink method doesn't allow * loading of the specified dynamic library - * @exception UnsatisfiedLinkError if the library does not exist. + * @exception UnsatisfiedLinkError if either the libname argument + * contains a file path, the native library is not statically + * linked with the VM, or the library cannot be mapped to a + * native library image by the host system. * @exception NullPointerException if libname is * null * @see java.lang.SecurityException