Large Java Applets are Buckets of Grief

java-logo-thumb.png

I've spent the better part of this day trying to track down a nasty little bug in, what I think, is Windows XP IE/Firefox and the Sun JDK/JRE Applet plugin 1.6.0_06. Now I say trying because I thought I had it fenced in to a certain set of repeatable conditions, but when I went back to check them after about an hour of running other tests, they failed me and the problem vanished. Crud!

The problem seemed to be a combination of using WebStart and a specific application off WebStart, and other Java apps on my box, and a web page that uses two fat Java applets to display data. One is a table of data, the other a graph of the same data. When I went to the web page, after running the WebStart application, IE (and Firefox) would lock up. Totally locked up. Not good.

I dug into this and have come to the conclusion that it's a combination of running this app pn WebStart, possibly the applet JRE version, and certainly the loading order on the page(s) in IE. If I go to the 'problem' page first, I get trouble - keep all else the same and going to another page first means that I can safely go to the 'problem' page later. Very odd.

When I went to change the version of the JRE that IE uses in it's applet tags, I found it exceptionally hard - as opposed to something like Mac OS X has where there is a little app that controls the version of the JRE used for applets. It's these little things that really frost my cookies with Java and Windows.

Anyway, I'm spending my day not really accomplishing anything because of these large applets and IE issues. I understand that sometimes it's nice to have applets to have a limited interactive functionality, and applets are great for that. But when the applets get to the point where they are causing as much grief as this, then you've overextended the design goals of applets. They become apps and that's what WebStart is supposed to make easier to deploy.

UPDATE: after another hour or so of fiddling about, it turns out that if I use JDK 1.5.0_15 and that's all, then I'm OK. If I even install JDK 1.6.0, it's going to take over the applet duties for IE - no matter what the settings in IE say. This, then causes the problem and we get the lock-ups. If I didn't need JDK 1.6.0, I'd be OK, but we need to have Java WebStart, and the 1.6.0 version is what we're standardizing on there. This means that for now, we leave the users on 1.5.0_15 and when we have to update to 1.6.0 for the WebStart for the users, I'm sure hoping that we have a newer version than 1.6.0_06 - with a fix for this crummy problem.

I hate big Java applets. Make an application, for heavens sake! Or switch to something like AJAX, or live with the page refreshes! It's not meant to do this.

UPDATE: HA! I found a bug report at Sun where several people were complaining that they had applets that worked fine in 1.4 and 1.5, but with 1.6.0_06 they were having a lot of troubles - just like me! Sun's idea was to try 1.6.0_10 (beta) and see if that didn't fix the problem. So I downloaded the two-part JDK/JRE and BINGO! that fixed the problem. Guess Sun's had this quite a bit, and fixed it. Good enough. I still think we're pushing the limits on the applet design and we need to come up with a completely different client footprint design - AJAX and Javascript frameworks or a full-up client.