Jump to Real's How-to Main page

Fix the "Wrong magic number" error message

The "magic number" is represented by the first few bytes of a given file. It is used to identified the file type.

For Java classes, the magic number is 0xCAFEBABE (you can verify this by viewing a class file with hexadecimal editor or the DOS Debug utility). This is used by the browser JVM as a quick check of whether the called file is really a Java class.

If the message is displayed and you are sure that you have uploaded a "real" class to web server then it's probably because the FTP download has been done in TEXT mode instead of BINARY so the resulting file on the server is corrupted.


If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]