How to Get Applets to Work
I am the author of the JeoEdit package for computational geometry, consisting of the JeoEditPoints applet and the JeoEditPolygon applet, and here are some hints about how to get Java applets to work on the UNIX machines in the computer labs of the School of Computer Science at McGill University. Given the typical state of our network and the computers on it, these hints are simply my best guesses - if they don't solve the problem then perhaps the systems staff will. As the Java substandard standards evolve and the software installed on our network keeps on changing, for better or for worse, you may encounter difficulties that are beyond the scope of my limited imagination.
While the web browsers that are currently installed in the lab support the old Java 1.0.2 standard, they may not be compatible with the new Java 1.1 which is needed for most modern applets, including my JeoEdit package. Using the new Java 1.1 should not present a problem on the Linux machines in the main computer lab, providing that they have the right software properly installed and configured. To view web pages with applets, it is best to run Netscape Communicator 4.06 (or newer) using the communicator command. For all your development needs, Sun's JDK 1.1.6 (or newer) along with its appletviewer are also available on the Linux machines as well as the skinner machine. While the appletviewer supports multiple applets embedded in a web page and even allows them to communicate with each other, it does not allow you to view the web pages where the applets reside. If you find that you are having undeserved trouble running a Java applet with appletviewer, restart your session on your computer and invoke the appletviewer command with your home directory as your current directory (I don't know why this helps, but sometimes it does).
If you are not lucky enough have access to Netscape Communicator 4.06 (or newer) on your local machine, then to use the new Java 1.1 you will need an account on the skinner machine. Here, a good way to test applets and view web pages with applets is Sun's Java web browser HotJava 1.1.4 (or newer). You should be aware that, although the HotJava browser officially supports HTML 3.2 as well as tables and frames, it is actually pretty clumsy and slow when confronted with complex web pages; the only solution is to upgrade to the latest version of HotJava. Better still, get the best of both worlds: use Netscape Navigator for displaying web pages and HotJava for running web-based applets.
Assuming your user name is jill and local computer's name is bigbox, here is a xterm transcript demonstrating how to log onto skinner from a remote computer and run the HotJava browser:
If you find that all colors in the remote HotJava browser look weird, as though they have gone through a blender, and your local computer happens to be running the Linux operating system, then there is an extra precaution you need to take before running HotJava (similar steps may help to solve color problems with the appletviewer). Start out by pressing Control-Alt-F6 and the screen of your local computer should change radically to a simple UNIX text terminal (press Control-Alt-F2 or Control-Alt-F3 to exit if you run into trouble). Next you will need to log onto your local machine anew. If you are asked about the kind of terminal you are using, typically a safe choice is vt100. At the command prompt, enter the command startx -- :1 -bpp 8 and the screen should revert to the familiar X Windows environment. Finally, follow the above steps to access HotJava, except instead of setenv DISPLAY bigbox:0 you will need to type setenv DISPLAY bigbox:1 (naturally replacing bigbox by your local machine name). Hopefully, this secret incantation will make the problem vanish into thin air and all colors will be magically set aright. If not, I suppose, you can always try a different computer to see if your luck improves. If that doesn't work either, then what you need is some other variety of voodoo. Consult your local high priest.
Wishing you good luck
(and hoping that you won't actually need it)...
- Mark Grundland
JeoEdit Package: Copyright © 1998
Mark Grundland & Godfried Toussaint.
All rights reserved.