Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

invoking java 7 jar in java 6 client code.

ManjitFeb 6 2018 — edited Feb 8 2018

I have java 6 running in my machine.I compile my java 6 client that is invoking third party java 7 API (jar file).While compiling I get warning that

"major version 51 is newer than 50,the highest major version supported by this compiler.It is recommended that the compiler be upgraded"

I ignore the warning ,and run my client.

Then I get this error "UnsupportedClassVersionError...Unsupported major minor version 51.0

Interestingly I get the above error in the second call below !I thought the error should have been received in the first call itself.

            //java 7 api call

            ApiFactory.initialize();

            //another java 7 api call

            ApiSecurityCallback securityCB = new DefaultSecurityCallback("Guest", "Guest");

Infact I was expecting compilation error !

Can someone solve the mystery.

thanks

manjit

This post has been answered by handat on Feb 7 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2018
Added on Feb 6 2018
10 comments
423 views