summaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-06-17 00:14:11 +0200
committerMichael Bien <[email protected]>2010-06-17 00:14:11 +0200
commit33a24c85dd18d851b614359bb6b19535afd56d33 (patch)
treee943d0d45d28e41633d7279c41e03d81fd94a009 /src/newt
parenteca1abf29ac48dd18c2d40f44c2396ce160df6f2 (diff)
Provide a classloader for all reflection driven classloading ops.
- attempt to solve some issues in module systems - all classes are now loaded with the same classloader which loads GLProfile
Diffstat (limited to 'src/newt')
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/impl/macosx/MacDisplay.java5
-rw-r--r--src/newt/classes/com/jogamp/newt/util/MainThread.java2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/impl/macosx/MacDisplay.java b/src/newt/classes/com/jogamp/newt/impl/macosx/MacDisplay.java
index 861dc7a6c..0fde19cd4 100755
--- a/src/newt/classes/com/jogamp/newt/impl/macosx/MacDisplay.java
+++ b/src/newt/classes/com/jogamp/newt/impl/macosx/MacDisplay.java
@@ -93,17 +93,20 @@ public class MacDisplay extends Display {
}
protected static boolean runOnAWTEDT(boolean wait, Runnable r) {
- if(ReflectionUtil.isClassAvailable("java.awt.EventQueue")) {
+ ClassLoader cl = MacDisplay.class.getClassLoader();
+ if(ReflectionUtil.isClassAvailable("java.awt.EventQueue", cl)) {
try {
if(wait) {
ReflectionUtil.callStaticMethod(
"java.awt.EventQueue",
+ cl,
"invokeAndWait",
new Class[] { java.lang.Runnable.class },
new Object[] { r } );
} else {
ReflectionUtil.callStaticMethod(
"java.awt.EventQueue",
+ cl,
"invokeLater",
new Class[] { java.lang.Runnable.class },
new Object[] { r } );
diff --git a/src/newt/classes/com/jogamp/newt/util/MainThread.java b/src/newt/classes/com/jogamp/newt/util/MainThread.java
index cfe1876b5..cbd520104 100644
--- a/src/newt/classes/com/jogamp/newt/util/MainThread.java
+++ b/src/newt/classes/com/jogamp/newt/util/MainThread.java
@@ -116,7 +116,7 @@ public class MainThread {
// start user app ..
try {
- Class mainClass = ReflectionUtil.getClass(mainClassName, true);
+ Class mainClass = ReflectionUtil.getClass(mainClassName, true, getClass().getClassLoader());
if(null==mainClass) {
throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
}