summaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/NativeLibLoader.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2003-07-15 05:09:58 +0000
committerKenneth Russel <[email protected]>2003-07-15 05:09:58 +0000
commit9d02187636cd51a113637bfeeaecb0a5a8811ff3 (patch)
tree7c2dab8397b6db504983e0ccb7ae091e95f5bc8d /src/net/java/games/jogl/impl/NativeLibLoader.java
parentb17e08aa0f7e400bc825bf379696a66114d064ec (diff)
Fixed problem where loadLibrary calls needed to be done inside
doPrivileged() block. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@28 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/NativeLibLoader.java')
-rw-r--r--src/net/java/games/jogl/impl/NativeLibLoader.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/net/java/games/jogl/impl/NativeLibLoader.java b/src/net/java/games/jogl/impl/NativeLibLoader.java
index 87a03be4f..4c944413a 100644
--- a/src/net/java/games/jogl/impl/NativeLibLoader.java
+++ b/src/net/java/games/jogl/impl/NativeLibLoader.java
@@ -39,13 +39,20 @@
package net.java.games.jogl.impl;
+import java.security.*;
+
public class NativeLibLoader {
static {
- boolean isOSX = System.getProperty("os.name").equals("Mac OS X");
- if (!isOSX) {
- System.loadLibrary("jawt");
- }
- System.loadLibrary("jogl");
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ boolean isOSX = System.getProperty("os.name").equals("Mac OS X");
+ if (!isOSX) {
+ System.loadLibrary("jawt");
+ }
+ System.loadLibrary("jogl");
+ return null;
+ }
+ });
}
public static void load() {