summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2010-06-26 07:02:16 +0300
committerSven Gothel <sgothel@jausoft.com>2010-06-26 07:02:16 +0300
commitc9adeced407a9f652594c1334a3ae73eff4fba79 (patch)
tree169abf645cabbb6c483fbb46ea46630412e3f9c6 /src/nativewindow/classes
parentf0bee9b5d23e100fe92b019c1afb76d8223c0d76 (diff)
parent33a24c85dd18d851b614359bb6b19535afd56d33 (diff)
Merge branch 'master' of github.com:sgothel/jogl
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java2
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java2
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java10
3 files changed, 8 insertions, 6 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java
index 8cf02965b..2ee2cb02c 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java
@@ -87,7 +87,7 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory {
throw new IllegalArgumentException("OS " + getNativeOSName(false) + " not yet supported");
}
- nativeWindowConstructor = ReflectionUtil.getConstructor(windowClassName, new Class[] { Object.class, AbstractGraphicsConfiguration.class });
+ nativeWindowConstructor = ReflectionUtil.getConstructor(windowClassName, getClass().getClassLoader(), new Class[] { Object.class, AbstractGraphicsConfiguration.class });
} catch (Exception e) {
throw (IllegalArgumentException) new IllegalArgumentException().initCause(e);
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
index c692e51c4..75d5c33bc 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
@@ -78,7 +78,7 @@ public abstract class GraphicsConfigurationFactory {
if (NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(true))) {
try {
GraphicsConfigurationFactory factory = (GraphicsConfigurationFactory)
- ReflectionUtil.createInstance("com.jogamp.nativewindow.impl.x11.X11GraphicsConfigurationFactory", new Object[] {});
+ ReflectionUtil.createInstance("com.jogamp.nativewindow.impl.x11.X11GraphicsConfigurationFactory", GraphicsConfigurationFactory.class.getClassLoader(), new Object[] {});
registerFactory(javax.media.nativewindow.x11.X11GraphicsDevice.class, factory);
} catch (Exception e) {
throw new RuntimeException(e);
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index 41be6e4b2..eb52e7211 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -113,8 +113,10 @@ public abstract class NativeWindowFactory {
nativeWindowingTypeCustom = nativeOSNameCustom;
}
+ ClassLoader cl = NativeWindowFactory.class.getClassLoader();
+
if( TYPE_X11.equals(nativeWindowingTypePure) ) {
- ReflectionUtil.callStaticMethod( X11UtilClassName, "initSingleton", new Class[] { }, new Object[] { } );
+ ReflectionUtil.callStaticMethod( X11UtilClassName, cl, "initSingleton", new Class[] { }, new Object[] { } );
}
registeredFactories = Collections.synchronizedMap(new HashMap());
@@ -130,12 +132,12 @@ public abstract class NativeWindowFactory {
// We break compile-time dependencies on the AWT here to
// make it easier to run this code on mobile devices
isAWTAvailable = !Debug.getBooleanProperty("java.awt.headless", true, acc) &&
- ReflectionUtil.isClassAvailable(AWTComponentClassName) &&
- ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice") ;
+ ReflectionUtil.isClassAvailable(AWTComponentClassName, cl) &&
+ ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice", cl) ;
if ( isAWTAvailable ) {
// register either our default factory or (if exist) the X11/AWT one -> AWT Component
- registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false), factory);
+ registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false, cl), factory);
}
if(DEBUG) {