Incompatible magic value 218774561 error in applet
861884May 13 2011 — edited May 14 2011Hi Guys,
This is my first post here, but I have been working with Java for some time now. I am working on putting a couple programs I made on my personal website as applets. I uploaded all the .class files to the web server, but when I go to the website to view the applet, I get this error:
Java Plug-in 1.6.0_25
Using JRE version 1.6.0_25-b06 Java HotSpot(TM) Client VM
User home directory = C:\Users\Nate
----------------------------------------------------
c: clear console window
...
0-5: set trace level to <n>
----------------------------------------------------
java.lang.ClassFormatError: Incompatible magic value 218774561 in class file editor/EditorGUI
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassFormatError: Incompatible magic value 218774561 in class file editor/EditorGUI
Several searches led me to this forum to a thread that apparently no longer exists. I thought I would ask here as I continue my search. "EditorGUI" is the class that extends JApplet and contains the init() method. All the .class files are in a folder called "editor", which is also the package name for my program's source files. I use Eclipse IDE, and have verified that the applet works using the applet viewer in Eclipse.
I appreciate any help you can offer.