Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/util/Apps at java

用myeclipse运行Hadoopword count程序时报错

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/util/Apps

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.util.Apps

错误原因

缺少Hadoop的yarn的jar包,导入jar包就好了

解决

把/usr/hadoop/hadoop-2.7.3/share/hadoop/yarn里的jar包导入到myeclipes的lib文件夹里,并全部选中重新构建路径
Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/util/Apps at java_第1张图片

你可能感兴趣的:(笔记,hadoop,apache,java)