Bad magic number
March 20th, 2009
Applies to:
NA
Description:
Each class file starts with special 4 bytes equal to the hexadecimal value of 0xCAFEBABE – this number identifies the class file format and is humorously named “Magic Number”. When you get an error from the JVM saying “Bad Magic Number”, it simply means the class file it is trying to load is corrupt (or perhaps the JVM is corrupt).
Cause:
Class file or JVM is corrupt
The solution is usually to recompile all your classes.