Six Stars

Unsupported major.minor version 51.0

I started using new TOS DI 6.1 in my local machine. I have JAVA 8 installed. My talend job works fine in my local.
I exported the job to a batch job, and put it in the server side. The java version in the server side is still java 7. When I ran the job, I got error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: test/main_process : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(
        at java.lang.ClassLoader.defineClass(
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
I tried to change the installed JRE to Java 7 under Window->Preferences->Java, and exported the job again, I got exactly the same error as above.

May I know if there is a way to let my local still using java 8 and TOS 6.1, but exported job could run under Java 7 as well.
Six Stars

Re: Unsupported major.minor version 51.0

Does TOS 6.1 only can work under Java 8 and cannot compile the code with lower Java JDK?

Re: Unsupported major.minor version 51.0


Actually, this problem is usually caused by  "a higher JDK during compile time and lower JDK during runtime". The JDK version  in your server side is java 7? Can you upgrade your JDK on server?

Best regards
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Unsupported major.minor version 51.0

I was able to simply update the JDK version on the server to solve this issue. I found a tutorial how one can accomplish this.
//edit: I'm not yet allowed to post a URL but you can try this:
bigdatafan. / 2016 / 05 / upgrade-java-to-jdk-8-on-cloudera-cdh. html