Solved

Closing all instances of a Browser via executable jar...

Posted on 2006-07-05
9
256 Views
Last Modified: 2010-03-31
Hello, we have an executable jar that is downloaded and ran by the user of our site. This Jar grants our domain neccessary access to run our applet. The problem we are having is that when the Jar is installed, the JVM has to be reloaded as well as the browser for the changes to take effect. Is there a way to kill all instances of browsers, then reopen them to a specific webpage (IE our login page). Thanks
0
Comment
Question by:cwitr329
  • 4
  • 4
9 Comments
 
LVL 92

Expert Comment

by:objects
ID: 17047625
nnot that I'm aware of.
why do u need the browser restarted?
0
 

Author Comment

by:cwitr329
ID: 17047647
When our domain is granted the needed permissions on the local machine, they can then use our applet on the site. Problem is, this affect doesnt take place until the JVM is restarted. So technically the only thing needed is the JVM restarted. So if the user tries to run it immediately, it wont run. We would like to elliminate this problem. Thanks
0
 
LVL 92

Expert Comment

by:objects
ID: 17047669
how is your domain being granted permissions?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cwitr329
ID: 17047686
Via security setting in Java, once granted it stays on the users computer. We just need to Kill A) The JVM, then restart it or B) Kill the Browser and restart it. Please let me know if anyone knows how to do this. Thanks
0
 
LVL 92

Expert Comment

by:objects
ID: 17047701
I see. Why aren't you just signing your applet jar?

afaik theres no standard way to shutdown the browser, you'd need to write some native code
0
 

Author Comment

by:cwitr329
ID: 17047713
Well, if I sign my jar, it still asks the user to Accept it (Browser security permissions). This applet is running in a hidden I-frame, so we need it to run without any dialogs. The only way we have determined how to do this is to grant permissions for our domain. I guess I could write something in C++ that is ran when the EXE Jar is ran to close browsers??
0
 
LVL 92

Expert Comment

by:objects
ID: 17047737
they'd only get prompted the first time they logged in.

otherwise, you'll need to use native code.
0
 

Author Comment

by:cwitr329
ID: 17047773
OK, thanks. I will look into it. I will keep this open for a little longer just incase someone else has some insight. Thanks
0
 
LVL 26

Accepted Solution

by:
ksivananth earned 250 total points
ID: 17048696
I am not sure if I understand your problem clearly but if you call System.exit( 0 ) from an applet which is loaded in a browser, it is going to close all the browser instances spawned from that browser. System.exit( 0 ) will kill the JVM from which the applet launched.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question