diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java | 6 | ||||
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java | 2 |
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) { } } |