java.lang.ClassNotFoundException
thrown on com.ms.*
package when applet
runsWhen running an applet in a browser by using the Sun Java™
Runtime Environment (JRE™), a
java.lang.ClassNotFoundException
is thrown by
ClassLoader
on the com.ms.*
package. The
same applet runs without any error under the Microsoft Virtual
Machine (VM).
The Microsoft VM provides many proprietary class libraries,
including J/Direct, Application Foundation Classes (AFC), and
Windows Foundation Classes (WFC). These packages are not available
in the Sun JRE, so a java.lang.ClassNotFoundException
is thrown when an applet runs in the browser.
Migrate the applet source code from using the Microsoft proprietary class libraries to similar classes in the Java platform. The following table shows a list of Microsoft VM and Java Platform class libraries:
Microsoft VM | Java Platform |
---|---|
J/Direct | Java Native Interface |
Application Foundation Classes | Swing, Java 2D APIs |
Windows Foundation Classes | Swing, Java 2D APIs |
How
to avoid potential pitfalls of Microsoft's non-standard SDK for
Java
Trail:
Creating a GUI with JFC/Swing
Lesson: Learning Swing with the NetBeans IDE