From 918b42027e024f3b7973463a6391db8c11d5d778 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Sat, 4 Jul 2009 02:51:49 +0000
Subject: Push custom loadLibrary handling down to NativeWindow
 NativeLibLoaderBase; X11AWTGLXGraphicsConfigurationFactory: Encapsule whole
 block in lock/unlock to minimize context switch

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2021 232f8b59-042b-4e1e-8c03-345bb8c30851
---
 .../com/sun/javafx/newt/impl/NativeLibLoader.java  | 75 ----------------------
 1 file changed, 75 deletions(-)

(limited to 'src/newt/classes/com')

diff --git a/src/newt/classes/com/sun/javafx/newt/impl/NativeLibLoader.java b/src/newt/classes/com/sun/javafx/newt/impl/NativeLibLoader.java
index 4283ef6dc..6316e750f 100644
--- a/src/newt/classes/com/sun/javafx/newt/impl/NativeLibLoader.java
+++ b/src/newt/classes/com/sun/javafx/newt/impl/NativeLibLoader.java
@@ -60,79 +60,4 @@ public class NativeLibLoader extends NativeLibLoaderBase {
     });
   }
 
-  //----------------------------------------------------------------------
-  // Support for the new JNLPAppletLauncher
-  //
-
-  private static class NEWTAction implements NativeLibLoaderBase.LoaderAction {
-    public void loadLibrary(String libname, String[] preload,
-        boolean preloadIgnoreError) {
-      if (null!=preload) {
-        for (int i=0; i<preload.length; i++) {
-          if(!isLoaded(preload[i])) {
-              try {
-                if(DEBUG) {
-                    System.err.println("NEWT NativeLibLoader preload "+preload[i]);
-                }
-                loadLibraryInternal(preload[i]);
-                addLoaded(preload[i]);
-              }
-              catch (UnsatisfiedLinkError e) {
-                if (!preloadIgnoreError && e.getMessage().indexOf("already loaded") < 0) {
-                  throw e;
-                }
-              }
-          }
-        }
-      }
-      
-      if(DEBUG) {
-        System.err.println("NEWT NativeLibLoader    load "+libname);
-      }
-      loadLibraryInternal(libname);
-      addLoaded(libname);
-    }
-  }
-
-  private static boolean usingJNLPAppletLauncher;
-  private static Method  jnlpLoadLibraryMethod;
-
-  static {
-    NativeLibLoaderBase.setLoadingAction(new NEWTAction());
-    String sunAppletLauncher = Debug.getProperty("sun.jnlp.applet.launcher", false);
-    usingJNLPAppletLauncher = Boolean.valueOf(sunAppletLauncher).booleanValue();
-  }
-
-  // I hate the amount of delegation currently in this class
-  private static void loadLibraryInternal(String libraryName) {
-    // Note: special-casing JAWT which is built in to the JDK
-    if (usingJNLPAppletLauncher && !libraryName.equals("jawt")) {
-        try {
-          if (jnlpLoadLibraryMethod == null) {
-            Class jnlpAppletLauncherClass = Class.forName("org.jdesktop.applet.util.JNLPAppletLauncher");
-            jnlpLoadLibraryMethod = jnlpAppletLauncherClass.getDeclaredMethod("loadLibrary", new Class[] { String.class });
-          }
-          jnlpLoadLibraryMethod.invoke(null, new Object[] { libraryName });
-        } catch (Exception e) {
-          Throwable t = e;
-          if (t instanceof InvocationTargetException) {
-            t = ((InvocationTargetException) t).getTargetException();
-          }
-          if (t instanceof Error)
-            throw (Error) t;
-          if (t instanceof RuntimeException) {
-            throw (RuntimeException) t;
-          }
-          // Throw UnsatisfiedLinkError for best compatibility with System.loadLibrary()
-          throw (UnsatisfiedLinkError) new UnsatisfiedLinkError().initCause(e);
-        }
-    } else {
-      // FIXME: remove
-      // System.out.println("sun.boot.library.path=" + Debug.getProperty("sun.boot.library.path", false));
-      System.loadLibrary(libraryName);
-      if(DEBUG) {
-          System.err.println("NEWT NativeLibLoader loaded "+libraryName);
-      }
-    }
-  }
 }
-- 
cgit v1.2.3