From 05024570dbf5fce08fa8ff081cb696f0fc4b7f95 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 18 Jun 2012 18:21:15 +0200 Subject: Fix Platform static initialization interdependencies w/ GlueGen native library loading Some Platform field declarations and it's static initialization has been delegated to it's new abstract super class PlatformPropsImpl to solve static initialization interdependencies w/ the GlueGen native library loading and it's derived information {@link #getMachineDescription()}, {@link #is32Bit()}, ..
This mechanism is preferred in this case to avoid synchronization and locking and allow better performance accessing the mentioned fields/methods. --- src/java/com/jogamp/common/jvm/JNILibLoaderBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/java/com/jogamp/common/jvm') diff --git a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java index b15b1e0..32f5101 100644 --- a/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java +++ b/src/java/com/jogamp/common/jvm/JNILibLoaderBase.java @@ -53,6 +53,7 @@ import com.jogamp.common.util.PropertyAccess; import com.jogamp.common.util.cache.TempJarCache; import jogamp.common.Debug; +import jogamp.common.os.PlatformPropsImpl; public class JNILibLoaderBase { public static final boolean DEBUG = Debug.debug("JNILibLoader"); @@ -149,7 +150,7 @@ public class JNILibLoaderBase { */ public static final boolean addNativeJarLibs(Class classFromJavaJar, String nativeJarBaseName) { if(TempJarCache.isInitialized()) { - final String nativeJarName = nativeJarBaseName+"-natives-"+Platform.getOSAndArch()+".jar"; + final String nativeJarName = nativeJarBaseName+"-natives-"+PlatformPropsImpl.os_and_arch+".jar"; final ClassLoader cl = classFromJavaJar.getClassLoader(); try { URL jarUrlRoot = JarUtil.getURLDirname( JarUtil.getJarSubURL( classFromJavaJar.getName(), cl ) ); -- cgit v1.2.3