Link to home
Start Free TrialLog in
Avatar of dirku
dirkuFlag for Germany

asked on

ClassFormatError

What's the reason for the following error message of the Navigator?

# Applet debug level set to 9
# stopApplet: contextID=2 appletID=13800992 parentMWContext=13682640
# Stopping applet: pm, appletID=13800992, contextID=2
# destroyApplet: contextID=2 appletID=13800992
# Destroying applet: pm, appletID=13800992, contextID=2
#     total applets=1
#   destroying context for contextID 2
# Destroying applet context: http://Storm/Pm/pm.html, contextID=2
# Destroying AppletFrame without disposing: netscape.applet.DerivedAppletFrame[frame2,0,0,850x300,hidden,layout=java.awt.BorderLayout,resizable,title=]
#   frameMWContext=13682640
# Destroying all applets: http://Storm/Pm/pm.html, contextID=2
# initApplet: contextID=2 appletID=13771952 parentContext=13682640 frameContext=13682640
# New applet context: http://Storm/Pm/pm.html, contextID=2
# Initializing applet: pm.class, appletID=13771952, contextID=2
#   docURL=http://Storm/Pm/pm.html reloadClasses=true
#     total applets=2
#     New applet: 13771952 at http://Storm/Pm/ width=850 height=300 hspace=0 vspace=0 align=baseline codebase=http://Storm/Pm/ code=pm.class
# startApplet: contextID=2 appletID=13771952 newFrameMWContext=13682640
# Starting applet: pm, appletID=13771952, contextID=2
#   preventing reuse of netscape.applet.AppletClassLoader@800cda6
#   new class loader netscape.applet.AppletClassLoader@8008b86
#      context = netscape.applet.MozillaAppletContext@800d660
#      codebase = http://Storm/Pm/
# Loading class pm
# Fetching http://Storm/Pm/pm.class
# Destroying AppletFrame without disposing: netscape.applet.DerivedAppletFrame[frame2,0,0,850x300,hidden,layout=java.awt.BorderLayout,resizable,title=]
# Applet exception: error: java.lang.ClassFormatError: Wrong class name inside class file
java.lang.ClassFormatError: Wrong class name inside class file
  at java.lang.ClassLoader.defineClass(Compiled Code)
  at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
  at netscape.applet.AppletClassLoader.findClass(Compiled Code)
  at netscape.applet.AppletClassLoader.loadClass1(Compiled Code)
* at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
  at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
  at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code)
  at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
  at java.awt.EventDispatchThread.run(Compiled Code)
  at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)

Using JBuilder 2 and the AppletViewer the program runs well.
Maybe it's important that I have all class files in a directory called "pm" since all the files of the program should belong to the package pm.
Avatar of dirku
dirku
Flag of Germany image

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of diakov
diakov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dirku

ASKER

Silly mistake! I really needed to change CODE="pm/pm.class" to CODE="pm/PM.class" ...