public static void loadLibrary(File extractedPath, List<String> candidates) {
		for (String lib : candidates) {
			File libPath = new File(extractedPath, lib);
			String absPath = libPath.getAbsolutePath();
			log.debug("Attempting to load dynamic library: " + absPath);
			try {
				System.load(absPath);
				log.info("Loaded dynamic library: " + absPath);
				return;
			} catch (UnsatisfiedLinkError e) {
				log.debug("Unable to load dynamic library: " + absPath, e);
			}
		}
		throw new RuntimeException("Failed to load Aspera dynamic library from candidates " + candidates + " at location: " + extractedPath);
	}
public static void loadLibrary ( File extractedPath , List < String > candidates ) { for ( String lib : candidates ) { File libPath = new File ( extractedPath , lib ) ; String absPath = libPath . getAbsolutePath ( ) ; log . debug ( "Attempting to load dynamic library: " + absPath ) ; try { System . load ( absPath ) ; log . info ( "Loaded dynamic library: " + absPath ) ; return ; } catch ( UnsatisfiedLinkError e ) { log . debug ( "Unable to load dynamic library: " + absPath , e ) ; } } throw new RuntimeException ( "Failed to load Aspera dynamic library from candidates " + candidates + " at location: " + extractedPath ) ; }
Loads a dynamic library into the JVM from a list of candidates
@param extractedPath The base directory where candidate dynamic libraries reside
@param candidates A list of candidate dynamic library names for various platforms
@return 	true if one of the candidate libraries was loaded successfully, else false