Exception in thread "main" java.lang.UnsupportedClassVersionError, Unsupported major.minor version 52.0

Seems like you are using JDK8 for compiling and Lower version on Where you are using it.

So

Assuming using eclipse, Window > Preferences > Compiler > compiler level

and then set lower level(< current one ).


I had the same problem which I solved. I found that the JAVA_HOME in my hadoop-env.sh is /usr/lib/jvm/java-6-openjdk but the JAVA_HOME in /etc/profile is /usr/local/java/jdk1.8.0_25.

After I change JAVA_HOME in /etc/profile to /usr/lib/jvm/java-6-openjdk which is the same as hadoop-env.sh and use $source /etc/profile # to make /etc/profile effects

My problem is solved! I hope this will help you.

Tags:

Java

Hadoop