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

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.

主站蜘蛛池模板: 江陵县| 新巴尔虎右旗| 富民县| 吉水县| 克山县| 广宗县| 扶风县| 汤阴县| 土默特左旗| 哈巴河县| 邛崃市| 阳城县| 仁寿县| 体育| 锡林浩特市| 麻阳| 台前县| 巴里| 景德镇市| 瓮安县| 天镇县| 大丰市| 孟州市| 新余市| 漯河市| 开封县| 赤水市| 德阳市| 珠海市| 阳城县| 二手房| 临泽县| 彝良县| 镇平县| 海城市| 行唐县| 聂荣县| 荔浦县| 罗源县| 沁水县| 平南县|