• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Imcompatible Magic Number?

 
Brian Moakley
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,

Things are going well in java land so far, been hitting the books pretty hard since January, and I've started to develop small apps for general day-to-day use.

Well, I finished one app and it works great on windows with no errors, so I thought I'd give it a roll on other operating systems. I just tried it on the latest version of Ubuntu with java 6 installed and when I run it, I get an error that reads:

"Incompatible magic value 1347093252 in class file com/jezner/teaxer/Controller at java.lang.ClassLoader.defineClass1(Native Method)"

I'm scouring the web and I cannot seem to find anything applicable. The error fires when the application is loaded. Any advice is appreciated.

Thanks,
Brian
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first 4 bytes of any class file must be equal to the hexadecimal value CAFEBABE, or the classloader will choke. My guess is that this class is packaged inside a JAR file, right? Reason being, a JAR file is basically a ZIP archive and a ZIP archive start with the 4 byte magic number 504B0304, which is equal to decimal value *drum roll please* 1347093252. I think the particular JAR archive became corrupt somehow. Try recompiling and repackaging, or if it's a third party JAR redownload.
[ July 19, 2008: Message edited by: Jelle Klap ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic