Solved

Java Client Applet - Incompatible Magic Value

Posted on 2010-08-18
4
626 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count11 challenge 6 49
nestparen challenge 4 57
computer science syllabus 3 53
eclipse java  build path 6 25
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now