Adhir
Adhir

Reputation: 749

bad version in class file

When I use certain jars in one of the connector projects i write for lombardi in TeamWorks eclipse i get a bad class version exception...

any ideas how this might be resolved..

Regards, Adhir

Upvotes: 4

Views: 13680

Answers (5)

TechSunil
TechSunil

Reputation: 161

Root Cause for this error is that: jars including in your project is complied from other version of java and you are compiling your project from other version of java simply upgrading version of java will resolve this problem.

I also faced the same problem.

Upvotes: 0

Kirk A
Kirk A

Reputation: 121

This problem can also be caused by an expired (365-day) Android certificate referenced by Eclipse.

See "Debug certificate expired" error in Eclipse Android plugins for details.

Upvotes: 1

Mike Pone
Mike Pone

Reputation: 19320

This is a result of running code compiled with a compiler version that is greater than the version of java you are using to run it. IE Code compiled with 1.6 and you are running it with 1.5. See this post to determine what version it was compiled with.

how-can-i-find-the-target-java-version-for-a-compiled-class

the easiest fix is to run it with the most recent JVM.

Upvotes: 0

Luixv
Luixv

Reputation: 8710

Try to compile/recompile all your stuff with the same compiler. Typically this happens when you have something compiled with a higher version and you try to run it with an older one.

Upvotes: 2

Simon Nickerson
Simon Nickerson

Reputation: 43159

You will get this error if you are using (say) Java 1.5 and you are using a JAR compiled with Java 1.6.

The easiest way to resolve is to upgrade your version of Java to the one used by the JAR.

Upvotes: 13

Related Questions