[英]Word Count Program in Hadoop Exception in thread “main” java.lang.ClassNotFoundException
I am using eclipse to export the jar file of a map-reduce program. 我正在使用eclipse导出map-reduce程序的jar文件。 When i am run the jar using command:
当我使用命令运行jar时:
hadoop jar Mapreduce.jar Mapreduce siva/file1.txt
Then Show Errors in 然后显示错误
Exception in thread "main" java.lang.ClassNotFoundException: Mapreduce
enter code here
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.net.URLClassLoader$1.run(URLClassLoader.java:201)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:200)
at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
at java.lang.ClassLoader.loadClass(ClassLoader.java:270)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
I could not figure out where is the problem.Please help me 我不知道问题出在哪里。请帮帮我
您需要给出完整的类名。我也表示包名,例如,如果我的类名是Mapreduce且包名是com.hadoop.ex,则您的命令应该是hadoop jar MapReduce.jar com.hadoop.ex.MapReduce inputFile输出文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.