Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Applet exception : java.lang.ClassFormatError : Bad magic number

4 views
Skip to first unread message

Philippe Moriceau

unread,
Oct 15, 1998, 3:00:00 AM10/15/98
to
Hello !

I am new in java /applet programming and I need your help

I have an applet that works fine locally or when it is in netscape class
directory.
But when I try to download it from server I have the messages in Java
console :

# Applet exception: error: java.lang.ClassFormatError: Bad magic number
java.lang.ClassFormatError: Bad magic number
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)

TIA
Philippe


Immanuel Babu

unread,
Oct 15, 1998, 3:00:00 AM10/15/98
to
The Java FAQ at http://www.afu.com has this to say:
"
2. (Sect. 12)
o Make sure you transfer the class files in binary mode, rather than
text or ASCII mode. An error from the browser saying "cannot start
applet ... bad magic number" usually means that one of the class
files on the server is corrupted. Replace your class binary files
on the web server, clean up the cache of your browser, and reload
your applet."

HTH
Regards

Immanuel Babu
--
Immanuel Babu
email: Immanu...@thehartford.com
phone: (860) 520 2739

0 new messages