diff options
author | Kenneth Russel <[email protected]> | 2009-06-18 07:02:02 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2009-06-18 07:02:02 +0000 |
commit | 1a775594c032da2df075fea60c79576c6709987d (patch) | |
tree | e00b2bd53335f13a5d72e02682cf45852417716b | |
parent | 3c6a7838b1a647b42cc8b37d1a433ed9a1431860 (diff) |
Refactored static initialization to let the JVM ensure it only runs
once; don't remember the JVM static initialization rules which
probably define why it was getting called twice
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1989 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | src/nativewindow/classes/com/sun/nativewindow/impl/jvm/JVMUtil.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/jvm/JVMUtil.java b/src/nativewindow/classes/com/sun/nativewindow/impl/jvm/JVMUtil.java index a4bffb100..3faab68bb 100644 --- a/src/nativewindow/classes/com/sun/nativewindow/impl/jvm/JVMUtil.java +++ b/src/nativewindow/classes/com/sun/nativewindow/impl/jvm/JVMUtil.java @@ -50,15 +50,6 @@ public class JVMUtil { private static final boolean DEBUG = Debug.debug("JVMUtil"); static { - initSingleton(); - } - - private static volatile boolean isInit = false; - - public static synchronized void initSingleton() { - if(isInit) return; - isInit=true; - NativeLibLoaderBase.loadNativeWindow("jvm"); ByteBuffer buffer = InternalBufferUtil.newByteBuffer(64); @@ -71,6 +62,9 @@ public class JVMUtil { } } + public static void initSingleton() { + } + private JVMUtil() {} private static native boolean initialize(java.nio.ByteBuffer buffer); |