public static String [ ] loadLibFiles ( String fileSuffix , String ... libAbsoluteClassPaths ) { Set < String > failedDllPaths = new HashSet < String > ( ) ; for ( String libAbsoluteClassPath : libAbsoluteClassPaths ) { String libraryName = libAbsoluteClassPath . substring ( libAbsoluteClassPath . lastIndexOf ( "/" ) + 1 , libAbsoluteClassPath . lastIndexOf ( fileSuffix ) ) ; try { prepareLibFile ( true , libAbsoluteClassPath ) ; System . loadLibrary ( libraryName ) ; LOGGER . info ( "Success load library: " + libraryName ) ; } catch ( Exception e ) { LOGGER . info ( "Load library: " + libraryName + " failed!" , e ) ; failedDllPaths . add ( libAbsoluteClassPath ) ; } } return failedDllPaths . toArray ( new String [ failedDllPaths . size ( ) ] ) ; }
Load libraries which placed in class path .