From 1a775594c032da2df075fea60c79576c6709987d Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 18 Jun 2009 07:02:02 +0000 Subject: 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 --- .../classes/com/sun/nativewindow/impl/jvm/JVMUtil.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/nativewindow') 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); -- cgit v1.2.3