java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor

One Star

java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor

I am having this exception when running my job that involves loading a jar lib I created using tLibraryLoad
---------------------------------------
java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor version 51.0
--------------------------------------
The exception occurs when I tried to instantiate a class in my jar in the tSetGlobalVar.
I have compiled and created the jar using java 1.6.0_45, and have also set the Installed JRE in the TOS to the same JDk 1.6.0_45.
I have also tried to compile and jar using the jre 1.7.25 and set the Installed JDK in the TOS to the same jre1.7.25, still have this exception
Can someone tell me what I am missing?
Thanks
PS when I tried to run class in my jar on the command line, it works no matter what: I compile and jar it using jdk 1.6.0_45, and run it using jdk1.7.25. What is the difference when running it inside the TOS?
Employee

Re: java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor

This problem is always caused by "a higher JDK during compile time and lower JDK during runtime".
In TOS inside the default JDK version is your "Environment Variables" which you set default.
Of cause ,you can change you TOS JDK version in "Windos--->Talend--->Java interpreter"
One Star

Re: java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor

The Java Interpreter was also set to jdk1.6.0_45.
Anyway, I decided to restart the TOS later yesterday for a different reason, and this error was gone magically, and it is working as it is suppose to.
One Star

Re: java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor

The Java Interpreter was also set to jdk1.6.0_45.
Anyway, I decided to restart the TOS later yesterday for a different reason, and this error was gone magically, and it is working as it is suppose to.

I have the same problem but  no magic things happen to solve...
Moderator

Re: java.lang.UnsupportedClassVersionError: ... : Unsupported major.minor

Hi olindo,

On which official version did you get that?
Would you mind giving us some additional details like what's your OS and java version?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog