SecurityManager sm = SecurityManager.current; if (sm != null) sm.checkLink(libname);  String filename; ClassLoader cl = VMSecurityManager.currentClassLoader(); if (cl != null) { filename = cl.findLibrary(libname); if (filename != null) { if (loadLib(filename) != 0) return; else throw new UnsatisfiedLinkError("Could not load library " + filename); } }  filename = VMRuntime.mapLibraryName(libname); for (int i = 0; i < libpath.length; i++) if (loadLib(libpath[i] + filename) != 0) return;  throw new UnsatisfiedLinkError("Could not find library " + libname + "."); }
loadLibrary(libname, VMStackWalker.getCallingClassLoader()); }
  public void loadLibrary(String libname)  {    SecurityManager sm = SecurityManager.current; // Be thread-safe!    if (sm != null)      sm.checkLink(libname);    String filename;    ClassLoader cl = VMSecurityManager.currentClassLoader();    if (cl != null)      {        filename = cl.findLibrary(libname);        if (filename != null)          {            if (loadLib(filename) != 0)	      return;	    else	      throw new UnsatisfiedLinkError("Could not load library " + filename);          }      }    filename = VMRuntime.mapLibraryName(libname);    for (int i = 0; i < libpath.length; i++)      if (loadLib(libpath[i] + filename) != 0)	return;    throw new UnsatisfiedLinkError("Could not find library " + libname + ".");	}