Issues with Java Versions in VM



0
[cloudera@localhost wordcount]$ hadoop jar dezyrewordcount.jar com.dezyre.DeZyreWordCount /wordcount/input/words.txt /wordcount/output
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/dezyre/DeZyreWordCount : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:201)

3 Answer(s)


0

[cloudera@localhost wordcount]$ java -version
java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)

0

hi Edgar,

Please let us know on how was the dezyrewordcount.jar was generated. Also can you execute the below command and paste the output

jar -tvf dezyrewordcount.jar

Thanks

0

Issue solved