Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Closing browser

 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,
is there a way that i close all open browsers on the client side using an applet code?
also is there a way to restart one browser after that?
the reason behind this is that from my signed applet, i am changing the max memory heap size for the jvm, and i need to close all browsers for the change to take effect, and a nice feature also is to put the user back into the log in page...
Any ideas?
Thanks,
Mohammad
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the netscape.javascript package


// Mathias


Ps. win.evalutate is not right. Could not post the right tag here
 
Mohammad Farhat
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mathias,
thanks for the reply...but this helps in closing simply the current window in which the applet is opened.
What i actually need is to close all instances of the browser currently opened, since this is the only way through which the jvm would be restarted...
Any other thoughts ?
Best,
Mohammad
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok! I don't know if you can loop thru all the browser windows. Try asking this question in the HTML, Javascript forum. If there is a reply that works, put the code in a javascript function and call the function inside the applet.

Mathias
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic