Hello,
How to restart AppletLoader after the applet has started?
Thanks you
why would you want to restart it?
otherwise ... press f5
Quote from: Matzon on May 26, 2011, 08:29:28
otherwise ... press f5
If you want to be a bit more fancy and do it programmatically, then use the following to refresh the page.
Quoteapplet.getAppletContext().showDocument(applet.getDocumentBase(), "_self" );
If you don't want to reload the whole html page, you can use JavaScript (e.g. with jQuery), to recreate the applet tag.
Thank you for your help
I use Jmonkeyengine3 and I would like download jars after the appletLoader has started
my code in appletloader
EventQueue.invokeAndWait(new Runnable()
{
public void run()
{
try
{
switchApplet();
} catch (Exception e)
{
fatalErrorOccured("This occurred while '" + getDescriptionForState() + "'", e);
}
setState(STATE_DONE);
repaint();
}
});
download2();
the download2() run but when the child applet start the classloader of download2() is missing!
Thank you
hmm, why do it in the appletloader code then?, since once you've passed the switchApplet() your essentially running the loaded applet. So you should do it in your own game code if you need it after that point.
Odd though that you'd need to download files at that point ? why not just get the appletloader to download the jars initially by specifying them in the html code?
Yes sorry it's not LWJGL
but how to downlaod after this point
I don't understand, when I download other jar after appletLoader the classLoader is missing
It's possible to update the classLoader or other?
Thank you
AppletLoader does some magic with the classloader (to handle natives and permissions).
But you can add jars to be downloaded in al_jars parameter (see http://lwjgl.org/wiki/index.php?title=Deploying_with_the_LWJGL_Applet_Loader_1_-_Basics)
Or you can load stuff from your own applet as mentioned, i.e. in it's ctor or init, as it will be running with a properly configured classloader.