Java Applet causes browser window to close

Posted on 2004-08-08
Last Modified: 2012-08-13
There is a particular site which is causing one of my clients no end of trouble.  The site is and the problem is that when they click on any of the featured photo ads (and probably in a lot of other places as well), the browser window starts to load the page and then closes down.

Everything works fine on my machine.

His environment is Win XP Home running IE6 and all the latest critical and security patches are applied.  It also fails in exactly the same way whe he uses FireFox.

My environment (for what it's worth) is Win2000pro with IE6 (but not necessarily all the latest patches) but I've also tried on various other machines on my network (XPpro/IE6, Win98/IE5) and got no failures.

I found that if I saved the source of the page in question (from my machine) and copied it to a file on his machine (test.htm) then double clicking on that file produced exactly the same problem.  This at least gave me something I could try debugging and I found that the statement causing the problem was

<applet codebase="/applets/" Code="apPopupMenu" Archive="/applets/apPopupMenu.jar" Width="636" Height="38" MAYSCRIPT>

It's OK before it (alert("got here");) but not after it.

I assume that there's probably some setting on his machine which could be causing this but have little idea where to look.

Has anybody any ideas?  Indeed, is there a better topic to be seeking the answer to this question?
Question by:trentham
  • 3
  • 3
LVL 36

Expert Comment

ID: 11746674

<applet codebase="/applets/" Code="apPopupMenu.class" Archive="/applets/apPopupMenu.jar" Width="636" Height="38" MAYSCRIPT>


Author Comment

ID: 11746830
No, I'm afraid that has exactly the same effect; the browser closes down.
LVL 36

Expert Comment

ID: 11746916
Well, the code you posted seems to be pretty stable. Most likely, the window is closing because of something in your Java applet. What is MAYSCRIPT acting upon and what PARAMS do you have?

You might want to post your Java code in the Java TA as there are a lot of experienced people there. Finally, try taking out all the code on your page temporarily and only leave the <applet> and its <param>s. See if it is absolutely certian it's the applet.
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.


Author Comment

ID: 11747270
I think I can't have made myself clear enough... this is not my code but code from the aforementioned site.  I just saved the source in order to highlight where abouts it was failing exactly.

I understand that this is a pretty major site for those into classic cars in the States and feel that if it had a problem there would have been many protests from its users so I assume that there is something causing a problem on this computer's settings.

I did try a test taking out all the JavaScript (leaving just the HTML and the applet) and it failed just as before.

I found another site which clearly uses applets and it shows the same behaviour on that machine so I assume it can't handle applets in some way.  Looking at the advanced internet properties it shows Use Java 2 v1.4.2_03 for <applet>.

I've also discovered that on IE's tools menu there is a 'Sun Java Console' which, if invoked, closes the browser in the same, sudden way..

My working machine shows (in installed programs)
     Java Runtime Environment 1.2

whilst the problem machine shows
     Java 2 Runtime Environment SE v1.4.0_01
     Java 2 Runtime Environment SE v1.4.2_03

Seeing that Sun are now showing the latest version as v1.4.2_05 I downloaded and installed this version and that cured the problem!

I can only assume that either v1.4.2_03 was problematic in some way or (perhaps more likely) that its installation on this machine was faulty in some way.

Still it's sorted now and my client will be a happy bunny.  thanks, Zyloch, for taking the time to look at this (enjoyed your profile btw :-))!

LVL 36

Expert Comment

ID: 11747571
Heh, sorry about the misunderstanding. (Of course, go and refund your points if you haven't already).

Author Comment

ID: 11748334
s'OK, it was an easy mistake to make!

Just in case anyone searches for a similar problem it may be worth summarising...

Problem: A particular web site caused the web browser to close

Additional Effect: Invoking Sun Java Console also causes the browser to close down

Solution: Upgrade Java runtime to latest (/ reinstall JRE?)

Cause: <applet ...> invokes Java Runtime Environment which is unable to run
   This is probably because either JRE is corrupt or the version contains bugs.

Accepted Solution

CetusMOD earned 0 total points
ID: 11785679
Closed, 250 points refunded.
Community Support Moderator

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

828 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