Why can't I see my Swing applet running in Microsoft Internet Explorer 5.5?

Omar Khan

The error message says that JApplet class is missing. This means that either there is an error in the calling HTML file or the appropriate jar file has not been loaded. First of all check the applet tag in the HTML file, refer to What is the syntax of the APPLET tag?

Secondly you should make the Java virtual machine load the appropriate .jar files. A solution could be to copy the swingall.jar in the client computer where you are using Explorer and set the classpath properly. For example if you copy swingall.jar in c: you have to set CLASSPATH =%CLASSPATH%;c:swingall.jar;
A better solution is to install the Java Plug-in in the client computer.

These two solutions are neither clean nor realistic since you are setting a hard constraint on your clients, namely the existance of a .jar or of a Plug-in.

The best solution is to rewrite your HTML file so that it automatically forces the download and installation of the plugin if the connecting client that has not it installed. Sun provides a HTML Converter tool for translating your HTML code so that it performs this task.

See also:
I'd like to use Swing in an applet but don't want to force everyone to download the Java Plug-in or the complete 2 MB swingall.jar file. Can I reduce the file to only those classes I need? What about the license?

How can I make my JApplet automatically download the Java Plug-in needed to run Swing applets?

How do I run Swing Applets in a Browser?