Hadoop WordCount.java依赖问题 [英] Hadoop WordCount.java Dependency Issues
问题描述
我正在尝试将WordCount.java文件编译到/ Desktop / Hadoop / playground / src中的jar中。
这是我正在使用的命令。 >
javac -classpath hadoop-1.2.1-core.jar -d playground / classes playground / src / WordCount.java
编译器似乎被调用,但是我正在收到这样的错误这样的
错误:package org.apache.hadoop.conf不存在import org.apache.hadoop.conf.Configuration
我如何解决这个问题?
可能有一个这个问题的答案。但是我无法解决它。
您需要设置hadoop-1.2.1-core.jar和all其他相关的jar正确 -
当您在 Desktop / hadoop
目录中时,请仔细尝试您的案例仅仅基于您在评论中提供的输入)
javac -classpath *:lib / * -d playground / class playground / src / WordCount.java
I am trying to compile WordCount.java file into jar inside of /Desktop/Hadoop/playground/src.
Here's the command I am using.
javac -classpath hadoop-1.2.1-core.jar -d playground/classes playground/src/WordCount.java
The compiler seem to be getting invoked, however I am getting tons of errors like this
error: package org.apache.hadoop.conf does not exist import org.apache.hadoop.conf.Configuration
How do I go about fixing this?
May be there is an answer to this issue already. However I could not fix it.
You need to set the paths of hadoop-1.2.1-core.jar and all the other dependent jars correctly --
Try this exactly while you are in the Desktop/hadoop
directory (valid in your case only solely based upon the inputs you provided in the comments)
javac -classpath *:lib/* -d playground/classes playground/src/WordCount.java
这篇关于Hadoop WordCount.java依赖问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!