diff options
author | Sven Gothel <[email protected]> | 2015-11-15 04:44:32 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-11-15 04:44:32 +0100 |
commit | 2034bbfac88b7d1360f9c939e173ff758f7f47ac (patch) | |
tree | 6cf21824937bb520b425b82485bf57303eeb1f7b /src/java/com/jogamp/common/os/DynamicLibraryBundle.java | |
parent | acd52a1936090eee11b3220f5c75ee37763773c7 (diff) |
Bug 1268 - DynamicLibraryBundleInfo: Add NativeLibrary's 'searchSystemPath' and 'searchSystemPathFirst' attributes
NativeLibrary can be instantiate by defining
'searchSystemPath' and 'searchSystemPathFirst' arguments,
allowing to specify the system path role while looking up the library.
Since NativeLibrary is utilized via DynamicLibraryBundleInfo upstream,
the latter interface shall allow users to specify those attributes.
Diffstat (limited to 'src/java/com/jogamp/common/os/DynamicLibraryBundle.java')
-rw-r--r-- | src/java/com/jogamp/common/os/DynamicLibraryBundle.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java index 66a24eb..a3d6198 100644 --- a/src/java/com/jogamp/common/os/DynamicLibraryBundle.java +++ b/src/java/com/jogamp/common/os/DynamicLibraryBundle.java @@ -249,9 +249,12 @@ public class DynamicLibraryBundle implements DynamicLookupHelper { return aptr; } - protected static final NativeLibrary loadFirstAvailable(final List<String> libNames, final ClassLoader loader, final boolean global) throws SecurityException { + protected static final NativeLibrary loadFirstAvailable(final List<String> libNames, + final boolean searchSystemPath, + final boolean searchSystemPathFirst, + final ClassLoader loader, final boolean global) throws SecurityException { for (int i=0; i < libNames.size(); i++) { - final NativeLibrary lib = NativeLibrary.open(libNames.get(i), loader, global); + final NativeLibrary lib = NativeLibrary.open(libNames.get(i), searchSystemPath, searchSystemPathFirst, loader, global); if (lib != null) { return lib; } @@ -269,7 +272,10 @@ public class DynamicLibraryBundle implements DynamicLookupHelper { for (i=0; i < toolLibNames.size(); i++) { final List<String> libNames = toolLibNames.get(i); if( null != libNames && libNames.size() > 0 ) { - lib = loadFirstAvailable(libNames, cl, info.shallLinkGlobal()); + lib = loadFirstAvailable(libNames, + info.searchToolLibInSystemPath(), + info.searchToolLibSystemPathFirst(), + cl, info.shallLinkGlobal()); if ( null == lib ) { if(DEBUG) { System.err.println("Unable to load any Tool library of: "+libNames); |