"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.
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.
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
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL