All IE windows closing on applet exit.

I currently have an applet which opens when going to a certain URL.  It runs checks and downloads the necessary jar files onto the user's computer.  When exiting the application, I use the command System.exit.

If I have a Internet Explorer open prior to going to the URL, then opening another IE window and accessing my URL from this window, upon exit, the applet closes normally, but also closes all other Internet Explorer Windows as well.  If I had opened another Internet Explorer window after accessing the URL, then that window doesn't close.

My question is, how can I close ONLY the Internet Explorer window from which the URL was accessed from?
LVL 4
JK2429Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
>>, I use the command System.exit.

You can't use that from an applet as it doesn't

a. make sense
b. have the right permissions

so you remove it first, then we'll readdress the problem
0
JK2429Author Commented:
One additional important fact I forgot to mention...
This only occurs if you click on a link from an email such as outlook.
0
CEHJCommented:
>>When exiting the application,

(I assume you meant 'applet' as you haven't mentioned an application previously or subsequently)
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

JK2429Author Commented:
>>(I assume you meant 'applet' as you haven't mentioned an application previously or subsequently)
Yes, Im sorry for the unclear question.

Upon closing of the IE Browser (which loads the applet) can terminate the applet and close the browser window, or exiting the applet also closes applet and the browser window.

0
CEHJCommented:
First of all, as i said, get rid of the System.exit
0
JK2429Author Commented:
got rid of System.exit...
0
CEHJCommented:
OK. Make sure you after you recompile it that you remove all caches copies of the old version
0
JK2429Author Commented:
Done, same thing.  It works if I type the link in IE, but won't work when clicked on from an email from outlook.  It will close all IE windows.
0
CEHJCommented:
What Java plugin are you using?
0
objectsCommented:
you can use Javascript to close the IE window

one way:

JSObject win = (JSObject) JSObject.getWindow(this);
win.eval("self.close();");

or you could load a page that will close it

<html>
   <body onLoad="window.close();">
   </body>
</html>
0
JK2429Author Commented:
>>What Java plugin are you using?
CEHJ, we are using Java JRE 1.4.1

Yes Objects, I was thinking about that option.  If we do go with the javascript option, it will require user actvating ok button on the IE popup message.  "Are you sure you want to navigate away from this page?"

During my research, I had come upon this link: http://www.ozzu.com/ftopic15.html
0
CEHJCommented:
Why would you need to close the browser window in Java btw? Why not show the user it's done and leave the user to decide what to do - they might want to check a favourite site for all you know ;-)
0
JK2429Author Commented:
We need to close the browser window for those computer users.  They expect all application related windows closed.
I doubt that...  :o)
0
objectsCommented:
javascript is the only way i'm aware of.

do your users have the "Reuse windows .." option checked?
0
JK2429Author Commented:
No, we have over 3500 users all over the world.  Each have different settings.
0
objectsCommented:
you'll possibly need to use activex to achieve your goal, and probably also sign your code.

another option might be to use web start so that no browser window is used in the first place.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JK2429Author Commented:
Will using web start still allow me to download the neccessary jar files and certificate verification we do with IE?
0
objectsCommented:
0
JK2429Author Commented:
Thanks (again) objects and CEHJ.  :o)
0
CEHJCommented:
:-)
0
objectsCommented:
glad my comment helped :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.