From 9d02187636cd51a113637bfeeaecb0a5a8811ff3 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 15 Jul 2003 05:09:58 +0000 Subject: 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 --- src/net/java/games/jogl/impl/NativeLibLoader.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/net/java/games/jogl/impl') 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() { -- cgit v1.2.3