The Grey Screen of Death (GSD)!
The bane of all applet developers, when seen in the wild the infamous Java GSD is most often not a code bug but an environmental incompatibility.
Plugins now offer some hope against the end user GSD experience. But plugins can present other challenges, especially when resource URLs change with every minor version release. Of course, once a browser has been updated to the needed Java version, the plugin syntax is just so much dead wood waiting for future obsolescence.
After being caught by a recent GSD, I decided that more information than simple failure would be far preferable. My solution is to launch my applet from a boot strap applet dubbed, for lack of a better name, Applet Launch.
Just writing the proper code is not enough. It seems that byte code has changed somewhat since version 1.0, so the boot strap applet must be compiled in JDK 1.0 for complete compatability.
| Parameter | Type | Description |
|---|---|---|
| appletlaunch.version | String | minimal version need to run (e.g. 1.3.1) |
| appletlaunch.callcode | String | code to launch (e.g. com.acme.foo.Main ) |
| appletlaunch.splash | url | url for splash screen |
| appletlaunch.color.background | Color | color for app background |
| appletlaunch.color.text | Color | color for text |
| appletlaunch.color.textbackground | Color | color for text background |
This is a standard applet call:
<applet code="NervousText.class" width="534" height="50">
<param name="text" value="Java^T^M 2 SDK, Standard Edition v1.4" />
Browser needs Java to display.
</applet>
This is the same call, with AppletLaunch wrapped around it:
<applet code="AppletLaunch.class" width="534" height="50">
<param name="appletlaunch.version" value="1.4" />
<param name="appletlaunch.callcode" value="NervousText" />
<param name="appletlaunch.splash" value="billcat.gif" />
<param name="text" value="Java^T^M 2 SDK, Standard Edition v1.4" />
Browser needs Java to display.
</applet>
Take a look at the applet in action on the test page.
You can download the AppletLaunch here. Or, just look at the code. This is released under GPL. i.e. don't blame me if anything blows up and enjoy.
I'd really like to know if anyone out there in the applet world is using this, please let me know if you do.