Solved

Java Client Applet - Incompatible Magic Value

Posted on 2010-08-18
4
635 Views
Last Modified: 2012-08-13
Sometimes I ask my friends to try out my applet and some get in and it works FINE for them... and for others... they get this error ...

java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file tileGen
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
*	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Open in new window


Maybe it's because I compiled with the latest version of java and the friends are used an outdated java? maybe? What do you think?

thanks.
0
Comment
Question by:UrbanTwitch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 33471491
yes that error is caused by comiling for a later version of java than it is being run with
you can use the javac switchs -target -source to control what version class file is produced
0
 
LVL 5

Author Comment

by:UrbanTwitch
ID: 33471497
What would be a good version to compile at? 1.5?
0
 
LVL 92

Expert Comment

by:objects
ID: 33471506
actually that value suggests its a corrupt class file that is being used.
might be worth getting them to clear there java cache and reload the applet

> What would be a good version to compile at? 1.5?

1.5 is a good choice
to do that you need to make sure you're not using any 1.6 features.
0
 
LVL 5

Author Comment

by:UrbanTwitch
ID: 33471549
Well then, my tileGen probably is because my friend who had the error got another error... so yeah.. either update or don't play. thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question