diff options
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rwxr-xr-x | src/newt/classes/com/jogamp/newt/impl/macosx/MacDisplay.java | 5 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/util/MainThread.java | 2 |
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)); } |