• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unload applet fully

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What would be the difference between executing the destroy method and "fully eliminating" the applet?
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
reply
    Bookmark Topic Watch Topic
  • New Topic