diff options
Diffstat (limited to 'src/java/com/sun/gluegen/runtime/NativeLibrary.java')
-rwxr-xr-x | src/java/com/sun/gluegen/runtime/NativeLibrary.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/java/com/sun/gluegen/runtime/NativeLibrary.java b/src/java/com/sun/gluegen/runtime/NativeLibrary.java index e939de4..c0e8cdf 100755 --- a/src/java/com/sun/gluegen/runtime/NativeLibrary.java +++ b/src/java/com/sun/gluegen/runtime/NativeLibrary.java @@ -126,15 +126,15 @@ public class NativeLibrary { path, and in the context of the specified ClassLoader, which is used to help find the library in the case of e.g. Java Web Start. */ public static NativeLibrary open(String libName, ClassLoader loader) { - return open(libName, libName, libName, true, loader, false); + return open(libName, libName, libName, true, loader, true); } /** Opens the given native library, assuming it has the same base name on all platforms, looking first in the system's search path, and in the context of the specified ClassLoader, which is used to help find the library in the case of e.g. Java Web Start. */ - public static NativeLibrary open(String libName, ClassLoader loader, boolean local) { - return open(libName, libName, libName, true, loader, local); + public static NativeLibrary open(String libName, ClassLoader loader, boolean global) { + return open(libName, libName, libName, true, loader, global); } /** Opens the given native library, assuming it has the given base @@ -157,14 +157,14 @@ public class NativeLibrary { String macOSXLibName, boolean searchSystemPathFirst, ClassLoader loader) { - return open(windowsLibName, unixLibName, macOSXLibName, searchSystemPathFirst, loader, false); + return open(windowsLibName, unixLibName, macOSXLibName, searchSystemPathFirst, loader, true); } public static NativeLibrary open(String windowsLibName, String unixLibName, String macOSXLibName, boolean searchSystemPathFirst, - ClassLoader loader, boolean local) { + ClassLoader loader, boolean global) { List possiblePaths = enumerateLibraryPaths(windowsLibName, unixLibName, macOSXLibName, @@ -178,10 +178,10 @@ public class NativeLibrary { } ensureNativeLibLoaded(); long res; - if(local) { - res = dynLink.openLibraryLocal(path); + if(global) { + res = dynLink.openLibraryGlobal(path); } else { - res = dynLink.openLibrary(path); + res = dynLink.openLibraryLocal(path); } if (res != 0) { if (DEBUG) { |