我在 Hadoop 1.1.1 中为 wordcount 创建了一个 jar 文件,同时运行 world count 它给了我以下错误:
hduseros@MT2012018:/usr/local/hadoop$ bin/hadoop jar playground/wordcount.jar org.apache.hadoop.examples.WordCount /user/input/playground /user/output1
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/examples/WordCount : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)