
上QQ阅读APP看书,第一时间看更新
Time for action – setting up the classpath
To compile any Hadoop-related code, we will need to refer to the standard Hadoop-bundled classes.
Add the Hadoop-1.0.4.core.jar
file from the distribution to the Java classpath as follows:
$ export CLASSPATH=.:${HADOOP_HOME}/Hadoop-1.0.4.core.jar:${CLASSPATH}
What just happened?
This adds the Hadoop-1.0.4.core.jar
file explicitly to the classpath alongside the current directory and the previous contents of the CLASSPATH environment variable.
Once again, it would be good to put this in your shell startup file or a standalone file to be sourced.