diff options
-rwxr-xr-x | src/java/net/java/games/joal/NativeLibLoader.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/java/net/java/games/joal/NativeLibLoader.java b/src/java/net/java/games/joal/NativeLibLoader.java index 394d1b4..011b1dd 100755 --- a/src/java/net/java/games/joal/NativeLibLoader.java +++ b/src/java/net/java/games/joal/NativeLibLoader.java @@ -38,10 +38,26 @@ package net.java.games.joal; import java.security.*; +import com.sun.gluegen.runtime.*; + class NativeLibLoader { static { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { + + boolean useGlueGen = + (System.getProperty("joal.use.gluegen") != null); + + if (useGlueGen) { + // Workaround for problems when OpenAL is not installed; + // want to be able to download the OpenAL shared library + // over e.g. Java Web Start and still link against it, so we + // have to use an alternate loading mechanism to work around + // the JDK's usage of RTLD_LOCAL on Unix platforms + NativeLibrary lib = NativeLibrary.open("OpenAL32", "openal", "openal", + NativeLibLoader.class.getClassLoader()); + } + // Workaround for problem in OpenAL32.dll, which is actually // the "wrapper" DLL which looks for real OpenAL // implementations like nvopenal.dll and "*oal.dll". |