2.设置JAVA_HOME和ClassPath
export PATH=:/home/grid/jdk1.6.0_30/bin
export JAVA_HOME=/home/grid/jdk1.6.0_30
3.用javac命令编译javac -classpath ../hadoop-core-1.2.1.jar FileSystemCat.java
4.向Hadoop复制文件bin/hadoop fs -put build.xml ./in
5.查看复制的文件:bin/hadoop fs -ls .6. 运行编译好的文件:../bin/hadoop FileSystemCat hdfs://master:9000/user/grid/in/build.xml
7.编译结果: