From 6557eedd0f0ec98d743c762a698bb028e88a9e16 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 18 Aug 2015 02:15:31 +0200 Subject: Bug 1194: Reinstate system-lib search for NativeLibrary.open(..) and PlatformPropsImpl.findSysLib(..). This patch partially reverts of commit d12e4d4ea279998b27457691038e709879dcaca6. NativeLibrary.open(..) requires search of system libraries, since it loads the actual 'tool library' for which we generate the JNI binding. The 'tool library' is preferably the system wide installed version, e.g. libGL.so etc. PlatformPropsImpl.findSysLib(..) also requires finding system libraries as needed for PlatformPropsImpl.queryElfFile(..), i.e. using libjava.so etc. Only the JNI 'glue library', glueing java calls to the 'tool library', shall not use the system wide library search since we shall only use JogAmp provided instances here. This patch also reinstates binary compatibility w/ prev. GlueGen JARs since NativeLibrary.enumerateLibraryPath(..) is public. +++ Further more 'NativeLibrary.enumerateLibraryPath(..)' now adds OSX system framework search _before_ the user path in case 'searchSystemPath && searchSystemPathFirst'. Original code always added this search to the end, which does not match the intended behavior (-> bug). --- src/junit/com/jogamp/common/os/TestElfReader01.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/junit/com') diff --git a/src/junit/com/jogamp/common/os/TestElfReader01.java b/src/junit/com/jogamp/common/os/TestElfReader01.java index fe03728..980a17a 100644 --- a/src/junit/com/jogamp/common/os/TestElfReader01.java +++ b/src/junit/com/jogamp/common/os/TestElfReader01.java @@ -38,7 +38,7 @@ public class TestElfReader01 extends SingletonJunitCase { } static File findJVMLib(final String libName) { final ClassLoader cl = TestElfReader01.class.getClassLoader(); - final List possibleLibPaths = NativeLibrary.enumerateLibraryPaths(libName, libName, libName, cl); + final List possibleLibPaths = NativeLibrary.enumerateLibraryPaths(libName, libName, libName, true, cl); for(int i=0; i