Applet wont start again after hitting refresh/reload in browser

Hi,



I have a game applet that is pretty much done, the remaining problem is the fact that if I hit reload/refresh. or navigate away from the applet and come back, the applet crashes. Is there a way to check for "refresh/reload, navigate away etc, so I can shut down the app properly and force it to reload when you go back?



Thanks


What kind of applet are you using, the newer SimpleApplet / StandardApplet or the other one ?

With the newer ones i think reloading was never really working out of the box yet.



I think the best source is the lwjgl demo applets. See what they do when reloading.

BaseSimpleApplet



I have looked at the AppletGears demo source code, not sure whats going on there though (pretty new to Java) and they are going direct thru lwgl and we are using the higher JmonkeyEngine layer.


This is what I had missed with Exodus Defence, which had siilar problems. (got the tip from javagaming):



<param name="separate_jvm" value="true">



So you get a new jvm each time.
And I do a proper cleanup on destroy.

Hi,



This works great thanks. Unfortunately it only seems to work on the PC. When I do reload on the mac it still effs up. Is there a different param setting for macosx?



Cheers



CH

It's probably related to some jME global state not being reset properly, think of all the static members and singletons jME uses.