Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.UnsupportedClassVersionError and Java versions

User757151-OracleSep 12 2014 — edited Sep 15 2014

Hello -

I've provided some of our users with a jar I compiled with Java 1.6. The jar consists of one class. The users are running Java 7.  However, some of them are getting this error:

                    java.lang.UnsupportedClassVersionError: <class> bad major version at offset=6


So, I checked the following:


    - java- -verbose indicates the class was compiled with Java 6:

        minor version: 0

      major version: 50

  - java -version indicates the user is running a newer version of java:

       1.7.0_67

 

- the jar manifest indicates the following:

      Created-By: 20.13-b02 (Sun Microsystems Inc.)

If i understand correctly, this means the java.lang.UnsupportedClassVersionError exception should not be occuring.


So I am baffled - is there anything i can do to diagnose or fix this?



Thanks for your help!

This post has been answered by Mohan Basavarajappa on Sep 15 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2014
Added on Sep 12 2014
2 comments
904 views