aspose file tools*
The moose likes Applets and the fly likes unload applet fully Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "unload applet fully" Watch "unload applet fully" New topic
Author

unload applet fully

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Hello
Is it possible to fully unload an applet from its destroy fully? I need the second instantiation of the applet to be loaded de novo, as if for the first time, even if just the back button on the browser was click. Can I hook some shutdown hook to fully eliminate the applet from the browser cache, and make it start "virginally" the next activation in the same browser session, without loosing the browser session? tia.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41867
    
  63
What would be the difference between executing the destroy method and "fully eliminating" the applet?


Ping & DNS - my free Android networking tools app
Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
Originally posted by Ulf Dittmer:
What would be the difference between executing the destroy method and "fully eliminating" the applet?


It appears that it is still in the cache. I need to configure it to fully shutdown and restart the jvm, if possible without closing the browser. I know I can unload a SE application by hooking the shutdown hook and realize that is similar to destroy(), however I really want to restart the jvm in the browser.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41867
    
  63
I don't think there is a way to restart the JVM. It generally stays active until the browser is closed. And unless the client-side jar file cache is disabled, it would also reuse the applet jar file.

But why would that be a problem - does the applet use class initializers that do something different on each invocation, or make use of finalizers? If the former, could you move that code to object constructors or the applet's init method?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unload applet fully