Solved

Java Client Applet - Incompatible Magic Value

Posted on 2010-08-18
4
633 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
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 59
ejb entity bean example 2 17
SequenceInputStream example 3 19
Java Eclipse Loop 3 21
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

830 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