From 9bb10d5ae27d2276ebf7710d9d8ea73d09c52294 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 15 Jun 2009 08:24:13 +0000 Subject: Changed a few Class.forName() calls to defer initialization to avoid eager initialization of the AWT, in particular on Mac OS X, where doing so was causing crashes during Newt initialization git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1953 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../classes/com/sun/nativewindow/impl/NWReflection.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nativewindow/classes/com/sun') diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java index 89b6201..99c8547 100644 --- a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java +++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java @@ -44,7 +44,7 @@ public final class NWReflection { public static final boolean isClassAvailable(String clazzName) { try { - Class clazz = Class.forName(clazzName); + Class clazz = Class.forName(clazzName, false, NWReflection.class.getClassLoader()); return null!=clazz; } catch (Throwable e) { } return false; @@ -52,7 +52,7 @@ public final class NWReflection { public static final Class getClass(String clazzName) { try { - return Class.forName(clazzName); + return Class.forName(clazzName, false, NWReflection.class.getClassLoader()); } catch (Throwable e) { } return null; } @@ -62,7 +62,7 @@ public final class NWReflection { Constructor factory = null; try { - factoryClass = Class.forName(clazzName); + factoryClass = getClass(clazzName); if (factoryClass == null) { throw new NativeWindowException(clazzName + " not available"); } -- cgit v1.2.3