diff options
author | Michael Bien <[email protected]> | 2010-06-17 00:14:11 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-06-17 00:14:11 +0200 |
commit | 33a24c85dd18d851b614359bb6b19535afd56d33 (patch) | |
tree | e943d0d45d28e41633d7279c41e03d81fd94a009 /src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java | |
parent | eca1abf29ac48dd18c2d40f44c2396ce160df6f2 (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/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java index 1a68f38d4..35bb93899 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java @@ -64,6 +64,7 @@ public class ThreadingImpl { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { String workaround = Debug.getProperty("jogl.1thread", true); + ClassLoader cl = ThreadingImpl.class.getClassLoader(); // Default to using the AWT thread on all platforms except // Windows. On OS X there is instability apparently due to // using the JAWT on non-AWT threads. On X11 platforms there @@ -72,8 +73,8 @@ public class ThreadingImpl { // while holding the AWT lock. The optimization of // makeCurrent / release calls isn't worth these stability // problems. - hasAWT = ReflectionUtil.isClassAvailable("java.awt.Canvas") && - ReflectionUtil.isClassAvailable("javax.media.opengl.awt.GLCanvas"); + hasAWT = ReflectionUtil.isClassAvailable("java.awt.Canvas", cl) && + ReflectionUtil.isClassAvailable("javax.media.opengl.awt.GLCanvas", cl); String osType = NativeWindowFactory.getNativeWindowType(false); _isX11 = NativeWindowFactory.TYPE_X11.equals(osType); @@ -103,7 +104,7 @@ public class ThreadingImpl { Object threadingPluginObj=null; // try to fetch the AWTThreadingPlugin try { - threadingPluginObj = ReflectionUtil.createInstance("com.jogamp.opengl.impl.awt.AWTThreadingPlugin"); + threadingPluginObj = ReflectionUtil.createInstance("com.jogamp.opengl.impl.awt.AWTThreadingPlugin", cl); } catch (JogampRuntimeException jre) { /* n/a .. */ } return threadingPluginObj; } |