Spec-Zone .ru
спецификации, руководства, описания, API

java.lang.ClassNotFoundException thrown on com.ms.* package when applet runs


Symptoms

When running an applet in a browser using the Sun JRE, a ClassNotFoundException is thrown by the ClassLoader on the com.ms.* package. The same applet runs under the Microsoft VM.

Cause

The Microsoft VM provides many proprietary class libraries, including J/Direct, AFC, and WFC. These package are not available in the Sun JRE, so a ClassNotFoundException is thrown when the applet runs.

Resolution

The workaround is to migrate the applet source code from using the Microsoft proprietary class libraries to similar classes in the Java 2 platform.

Microsoft VM Java 2 Platform
J/Direct Java Native Interface
Application Foundation Classes Swing, Java 2D APIs
Windows Foundation Classes Swing, Java 2D APIs

Related Information

How to avoid potential pitfalls of Microsoft's non-standard SDK for Java
Lesson: User Interfaces that Swing: A Quick Start Guide
Trail: Creating a GUI with JFC/Swing
Trail: Java Native Interface