aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 08:24:13 +0000
committerKenneth Russel <[email protected]>2009-06-15 08:24:13 +0000
commit810495ea88a8ee8d29bca84604f77a6871a7bd81 (patch)
tree5723519b715941ca6d8b58a8d25618bc7d0ee8b0 /src/nativewindow
parent53f4b910471f8a430348cfb64555000042b8632c (diff)
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
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java6
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
index 89b620161..99c854753 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");
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index 9fad5f5bd..34fdfbd72 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -120,7 +120,7 @@ public abstract class NativeWindowFactory {
if ( NWReflection.isClassAvailable("java.awt.Component") &&
NWReflection.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice") ) {
try {
- componentClass = Class.forName("java.awt.Component");
+ componentClass = NWReflection.getClass("java.awt.Component");
} catch (Exception e) { }
}