AppletLoader Fix: set correct context classloader for the applet loaded by the AppletLoader. Credit to arielsan for finding the issue and supplying a fix/patch.
This commit is contained in:
parent
51ab4101b8
commit
f4f6401efd
|
@ -774,7 +774,7 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
|
||||||
// set lwjgl properties
|
// set lwjgl properties
|
||||||
setLWJGLProperties();
|
setLWJGLProperties();
|
||||||
|
|
||||||
// make applet switch on EDT as an AWT/Swing permission dialog could be called
|
// make applet switch on the EDT as an AWT/Swing permission dialog could be called
|
||||||
EventQueue.invokeAndWait(new Runnable() {
|
EventQueue.invokeAndWait(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
@ -1024,6 +1024,9 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
|
||||||
|
|
||||||
debug_sleep(2000);
|
debug_sleep(2000);
|
||||||
|
|
||||||
|
// set correct context classloader for lwjgl applet
|
||||||
|
Thread.currentThread().setContextClassLoader(classLoader);
|
||||||
|
|
||||||
Class appletClass = classLoader.loadClass(getParameter("al_main"));
|
Class appletClass = classLoader.loadClass(getParameter("al_main"));
|
||||||
lwjglApplet = (Applet) appletClass.newInstance();
|
lwjglApplet = (Applet) appletClass.newInstance();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue