"Bad Magic Number"

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: "Bad Magic Number"

  1. #1
    Join Date
    Aug 2004

    "Bad Magic Number"

    Hi, I've just about finished writing my first applet (a draughts game). It works fine when stored locally, but when I upload it it doesn't load. I've tried opening the Java console and that seems to give some sort of message to the effect of “Bad Magic Number”.

    Does anyone have an idea what's causing this?

    The uploaded applet can be found here:

    Thanks for your time.

  2. #2
    Join Date
    Jul 2004
    A magic number is something built into class files so interpreters know that they are class files. I'm not an expert so I couldn't tell you exactly why it's getting it wrong, but try taking the source code out of your archive, if it's in one. Make sure that the main class is public also.

  3. #3
    Join Date
    Aug 2004
    I'm just wondering if it's the opposite. Because of the nature of the applet I've written, it has to be spread across several classes (in separate files) with the main applet class only a sort of wrapper for every thing else. Is it a case that the separate compiled files will need to be put in some sort of archive together? And if so, does anyone know how I would go about doing this in “Netbeans IDE”.

    I am very new to java so I'm sorry if this seems a stupid question.

    Thanks for your time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center