diff options
author | Sven Gothel <[email protected]> | 2011-12-01 16:24:32 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-01 16:24:32 +0100 |
commit | 5850e04ea8959cf1591db6788635df5645ab44ad (patch) | |
tree | 2485de47e55e0256b9359039f1fe063d97c07e62 /src/java/com | |
parent | 644eb1c3157ba3a18e4aec0f7bcb55081a9a3320 (diff) |
Minor edits / Put gluegen-rt 'libBaseName' static.
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/jogamp/common/os/Platform.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java index ca1a8db..f4bd6c1 100644 --- a/src/java/com/jogamp/common/os/Platform.java +++ b/src/java/com/jogamp/common/os/Platform.java @@ -53,6 +53,9 @@ import jogamp.common.os.MachineDescriptionRuntime; */ public class Platform { + /** fixed basename of JAR file and native library */ + private static final String libBaseName = "gluegen-rt"; + /** * System property: 'jogamp.gluegen.UseTempJarCache', * defaults to true if {@link #OS_TYPE} is not {@link OSType#ANDROID}. @@ -150,8 +153,7 @@ public class Platform { static { // We don't seem to need an AccessController.doPrivileged() block - // here as these system properties are visible even to unsigned - // applets + // here as these system properties are visible even to unsigned Applets. OS = System.getProperty("os.name"); OS_lower = OS.toLowerCase(); OS_VERSION = System.getProperty("os.version"); @@ -210,7 +212,7 @@ public class Platform { }).booleanValue(); loadGlueGenRTImpl(); - JVMUtil.initSingleton(); + JVMUtil.initSingleton(); // requires gluegen-rt, one-time init. MachineDescription md = MachineDescriptionRuntime.getRuntime(); if(null == md) { @@ -298,12 +300,10 @@ public class Platform { } private static void loadGlueGenRTImpl() { - final String libBaseName = "gluegen-rt"; - AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { - if(USE_TEMP_JAR_CACHE && TempJarCache.initSingleton()) { - final String nativeJarName = "gluegen-rt-natives-"+os_and_arch+".jar"; + if(USE_TEMP_JAR_CACHE && TempJarCache.initSingleton()) { + final String nativeJarName = libBaseName+"-natives-"+os_and_arch+".jar"; final ClassLoader cl = Platform.class.getClassLoader(); try { final URL jarUrlRoot = JarUtil.getURLDirname( @@ -314,9 +314,9 @@ public class Platform { } catch (IOException ioe) { ioe.printStackTrace(); } - } - DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false); - return null; + } + DynamicLibraryBundle.GlueJNILibLoader.loadLibrary(libBaseName, false); + return null; } }); } |