java.lang.ClassNotFoundException Thrown by
ClassLoader
Symptoms
When running an applet in a browser by using the Sun
JavaTM Runtime Environment
(JRETM) implementation, a
java.lang.ClassNotFoundException is thrown by the
ClassLoader. The same applet runs without any error
under the Microsoft Virtual Machine (VM).
Cause
This error is caused by applets being packaged as
.cab files. The .cab file is an
archive format specific to Microsoft Windows and it is not
supported by the Sun JRE.
Resolution
Extract the applet classes and resources from the
.cab files and repackage them as .jar
files using the Java Archive File Format (JARTM) tool from Java Development Kit (JDK).
Type the following command to repackage files as .jar files:
jar cvf
<jar_file><input_files>
Modify the <APPLET> tag in the HTML page to
specify the .jar files in the archive
attribute. For example, assume you have the following code: