Help Running Applets

In theory, Java programs are "write once, run everywhere." In practice, Java programs are somewhat less platform dependent than other programs, but they are still platform dependent. Java programs that run under a web browser, like Netscape or Internet Explorer, are called applets. Whether an applet runs correctly depends on the version of the browser, the operating system, the version of the operating system, and even the hardware configuration. Collectively, all these parameters are called the platform.

The applets included on the web pages for this course have been tested with a very limited number of platforms. This page is intended to help you diagnose problems. Please send email to eal@eecs.berkeley.edu if you find errors or can suggest additions to this page.

General assumptions

We assume that you are running under a standard browser with Java applets enabled, and that your computer has sound capability supported by Java. Most modern PCs and workstations with reasonably recent versions of the standard browsers (Netscape and Internet Explorer) meet these requirements.

Java version

Most of the applets on these pages require JDK 1.1 (JDK stands for the Java Development Kit). JDK 1.1 is supported by Netscape 4.06 and higher, and Internet Explorer 4.0 and higher.

If your browser does not support JDK 1.1, you might see the following message in your Java console window (which you can open under Netscape's "Communicator" menu):

# Applet exception: error: java.lang.NoSuchMethodError:
   java.awt.TextArea: method <init> (Ljava/lang/String;III)V not found

Diagnosing problems

Under Netscape, under the Communicator menu, there is an item called "Java Console." Select that to read error messages that occur while an attempt is being made to run an applet. Unfortunately, Internet Explorer (version 4.0) does not have a facility for looking at Java error messages, so if you are having trouble, we suggest using Netscape instead.

Unfortunately, the Java virtual machine often produces some pretty useless error messages. For example, "class not found" could mean almost anything. It roughly translates as "something went wrong."

CLASSPATH variable

Java supports an environment variable called CLASSPATH that tells the Java virtual machine where to look for code. As a general rule, it is not a good idea to set this variable. It is extremely difficult to set it correctly, and if it is set incorrectly, it may prevent all Java programs from running. The symptom is usually that you get a "class not found" error, although this error is generated by Java for almost any kind of problem.

Under Windows NT (4.0), open the Start menu (at the lower left), select Settings and then Control Panel. Open the System control panel, and click on the Environment tab. If the CLASSPATH variable is set, we suggest clearing it (you may want to save its value, since it may be needed by some other program). You then probably have to restart your browser.

More information about JDK 1.1 compatible browsers.