?
Solved

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

Posted on 2006-07-05
9
Medium Priority
?
279 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
Industry Leaders: 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 1000 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

Industry Leaders: 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!

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

840 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