wrong version 50.0, should be 49.0

I try to compile a project with a bunch of depending jar-files with JDK 1.6.0_18 and get this:

    [javac] bad class file: Y:\Javaproj\Word.jar (Document.class)
    [javac] class file has wrong version 50.0, should be 49.0

What exactly does it mean? What do I need to do to solve it?
mdolandAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
that means the jar contains class compiled with java 6, but you're compiling with java 5
0
 
objectsCommented:
check your javac version

javac -version

and check your path if its not as expected
0
 
mdolandAuthor Commented:
I compile through Eclipse and there I go with 1.6.0_18 and have the settings set to default, that is both compabilities are 1.6.

I saw that my JAVA_HOME in WIndows is 1.5. Does that matter?
0
 
VenabiliConnect With a Mentor Commented:
It shouldn't.  But make sure Eclipse really compiles with Java 6.
0
 
objectsConnect With a Mentor Commented:
> I compile through Eclipse and there I go with 1.6.0_18 and have the settings set to default, that is both compabilities are 1.6.

according to that error its using 1.5, so suggest you double check what it is using
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.