static void loadLibraryWithClassLoader(String libName,ClassLoader loader){
  SecurityManager sc=System.getSecurityManager();
  if (sc != null) {
    sc.checkLink(libName);
  }
  if (loader != null) {
    String fullLibName=loader.findLibrary(libName);
    if (fullLibName != null) {
      loadLibrary(fullLibName,loader,null);
      return;
    }
  }
  String path=System.getProperty("java.library.path","");
  path+=System.getProperty("vm.boot.library.path","");
  loadLibrary(libName,loader,path);
}

static void loadLibraryWithClassLoader ( String libName , ClassLoader loader ) { SecurityManager sc = System . getSecurityManager ( ) ; if ( sc != null ) { sc . checkLink ( libName ) ; } if ( loader != null ) { String fullLibName = loader . findLibrary ( libName ) ; if ( fullLibName != null ) { loadLibrary ( fullLibName , loader , null ) ; return ; } } String path = System . getProperty ( "java.library.path" , "" ) ; path += System . getProperty ( "vm.boot.library.path" , "" ) ; loadLibrary ( libName , loader , path ) ; }
this method must be provided by the vm vendor , as it is called by java . lang . system . loadlibrary ( ) . system . loadlibrary ( ) cannot call runtime . loadlibrary ( ) because this method loads the library using the classloader of the calling method . loads and links the library specified by the argument .
