官术网_书友最值得收藏!

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.

Note

We will later need to also have many of the supplied third-party libraries that come with Hadoop on our classpath, and there is a shortcut to do this. For now, the explicit addition of the core JAR file will suffice.

主站蜘蛛池模板: 山东| 灯塔市| 南雄市| 鹤岗市| 宁陵县| 石柱| 绍兴县| 梁平县| 青神县| 淳化县| 滦南县| 磴口县| 铁岭县| 彰武县| 收藏| 赞皇县| 长海县| 丰镇市| 涿州市| 崇信县| 南部县| 汪清县| 右玉县| 呼伦贝尔市| 固阳县| 巴里| 济源市| 定远县| 门源| 东方市| 汤原县| 金阳县| 遂昌县| 景泰县| 恩平市| 搜索| 康平县| 临沧市| 乐安县| 遵义市| 定襄县|