From cc76889a6fe96cffb91c9a3aa7934878c0ecd97e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 4 May 2012 01:12:25 +0200 Subject: Use ClassLoader to find JNI native libraries. ClassLoader was only used for tool native libraries. NativeLibrary: Expose 'String findLibrary(String libName, ClassLoader loader)', allowing utilization of System.load(loader.findLibrary(libName)). JNILibLoaderBase.loadLibrary(): Add optional ClassLoader argument, used to locate the library DynamicLibraryBundle: Use DynamicLibraryInfo's ClassLoader to find native libraries (tool + jni) --- .../com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/junit') diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java b/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java index 5fc2df7..23daa6d 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java @@ -36,7 +36,7 @@ public class BindingJNILibLoader extends JNILibLoaderBase { public static void loadBindingtest1p1() { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { - loadLibrary("Bindingtest1p1", null, true); + loadLibrary("Bindingtest1p1", null, true, BindingJNILibLoader.class.getClassLoader()); return null; } }); @@ -45,7 +45,7 @@ public class BindingJNILibLoader extends JNILibLoaderBase { public static void loadBindingtest1p2() { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { - loadLibrary("Bindingtest1p2", null, true); + loadLibrary("Bindingtest1p2", null, true, BindingJNILibLoader.class.getClassLoader()); return null; } }); -- cgit v1.2.3