java.lang.ClassNotFoundExceptionis thrown in Sun VM for classes put in Microsoft VM search path
SymptomsWhen running an applet that requires classes stored in Microsoft VM search path, in a browser using the Sun JRE, a java.lang.ClassNotFoundException is thrown. The same applet works in Microsoft VM.
Cause
Microsoft VM provides various ways for developers to put their classes and native libraries in the Microsoft VM search path:
%SYSTEMROOT%\Java\TrustClasses for trusted CLASS files %SYSTEMROOT%\Java\TrustLib for trusted JAR/CAB files %SYSTEMROOT%\Java\Classes for untrusted CLASS files %SYSTEMROOT%\Java\Lib for untrusted JAR/CAB files %SYSTEMROOT% for DLL Sun VM does not support these search path.
Resolution
The workaround is to put the classes and jars in Sun VM search path instead:
{java.home}\lib\applet for untrusted JAR files {java.home}\lib\ext for trusted JAR files %SYSTEMROOT% for DLL where {java.home} is the install directory of J2RE.
Note:
Sun VM does not support CAB, so any file packaged as CAB for Microsoft VM must be repackaged as JAR to be used in Sun VM.
Sun VM does not support search path for trusted/untrusted CLASS files on the system. Developers may workaround this by packaging CLASS files as trusted/untrusted JAR file.
Related Information
See http://support.microsoft.com/default.aspx?scid=kb;EN-US;177168 for more details on MSVM search path