• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1038
  • Last Modified:

Java Applet causes browser window to close

There is a particular site which is causing one of my clients no end of trouble.  The site is www.collectorcartraderonline.com 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?
  • 3
  • 3
1 Solution

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

trenthamAuthor Commented:
No, I'm afraid that has exactly the same effect; the browser closes down.
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.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

trenthamAuthor Commented:
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 :-))!

Heh, sorry about the misunderstanding. (Of course, go and refund your points if you haven't already).
trenthamAuthor Commented:
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.
Closed, 250 points refunded.
Community Support Moderator
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.

Join & Write a Comment

Featured Post

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.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now