/** Open the requested native library with the specified platform-specific * otions. */ static native long open(String name, int flags);
library = new NativeLibrary("<process>", null, Native.open(null, openFlags(options)), options);
handle = Native.open(libraryPath, openFlags); } catch(UnsatisfiedLinkError e) { libraryPath = findLibraryPath(libraryName, searchPath); LOG.log(DEBUG_LOAD_LEVEL, "Trying " + libraryPath); handle = Native.open(libraryPath, openFlags); if (handle == 0) { throw new UnsatisfiedLinkError("Failed to load library '" + libraryName + "'"); LOG.log(DEBUG_LOAD_LEVEL, "Preload (via System.loadLibrary) " + libraryName); System.loadLibrary(libraryName); handle = Native.open(libraryPath, openFlags); LOG.log(DEBUG_LOAD_LEVEL, "Trying " + libraryPath); try { handle = Native.open(libraryPath, openFlags); try { LOG.log(DEBUG_LOAD_LEVEL, "Trying " + libraryPath); handle = Native.open(libraryPath, openFlags); LOG.log(DEBUG_LOAD_LEVEL, "Trying " + libraryPath); try { handle = Native.open(libraryPath, openFlags); } catch(UnsatisfiedLinkError e2) { LOG.log(DEBUG_LOAD_LEVEL, "Loading failed with message: " + e2.getMessage()); File embedded = Native.extractFromResourcePath(libraryName, (ClassLoader)options.get(Library.OPTION_CLASSLOADER)); try {
/** Open the requested native library with the specified platform-specific * otions. */ static native long open(String name, int flags);
library = new NativeLibrary("<process>", null, Native.open(null, openFlags(options)), options);
System.out.println("Trying " + libraryPath); handle = Native.open(libraryPath, openFlags); } catch(UnsatisfiedLinkError e) { System.out.println("Trying " + libraryPath); handle = Native.open(libraryPath, openFlags); if (handle == 0) { throw new UnsatisfiedLinkError("Failed to load library '" + libraryName + "'"); handle = Native.open(libraryPath, openFlags); handle = Native.open(libraryPath, openFlags); System.out.println("Trying " + libraryPath); handle = Native.open(libraryPath, openFlags); handle = Native.open(libraryPath, openFlags); } catch(UnsatisfiedLinkError e2) { e = e2; File embedded = Native.extractFromResourcePath(libraryName, (ClassLoader)options.get(Library.OPTION_CLASSLOADER)); try { handle = Native.open(embedded.getAbsolutePath(), openFlags); libraryPath = embedded.getAbsolutePath(); } finally {