java.lang.LinkageError exception when you load an applet (294878)
The information in this article applies to:
- Microsoft virtual machine
This article was previously published under Q294878 SYMPTOMS
When you load an HTML page that contains a Java applet, you may receive a java.lang.LinkageError exception. If the Java console is enabled in Microsoft Internet Explorer, the Java console displays output similar to the following:
Error loading class: com/myCompany/TestApplet
java.lang.LinkageError: Class already defined in the context of this loader:
com/myCompany/TestApplet
java.lang.ClassNotFoundException: com/myCompany/TestApplet
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
CAUSE
This exception occurs because the full Java class package name uses a forward slash (/) instead of a period (.), and the package name does not explicitly add the .class extension to the end of the Java class. For example:
<APPLET code=com/myCompany/TestApplet
width=200
height=25 VIEWASTEXT>
</APPLET>
RESOLUTION
To resolve this problem, use one of the three working code class path names that are shown in the "More Information" section.
REFERENCES
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 6/14/2006 |
---|
Keywords: | kbJava kbprb KB294878 |
---|
|