首页 > 代码库 > hadoop-1.2.1+eclipse+ubuntu插件编译小记

hadoop-1.2.1+eclipse+ubuntu插件编译小记

1.安装JDK和Ant,下载hadoop-1.2.1,hadoop-1.2.1的eclipse插件源码位于${hadoop.home}/src/contrib/eclipse-plugin.

2.将源码导入eclipse中.File->import->General->Existing Projects into Workspace->选择${hadoop.home}/src/contrib/eclipse-plugin

3.编译的时候会提示找不到类.将下面的fileset添加到classpath中.

4.设置build.xml文件的jar.

5.在${hadoop.home}/src/contrib/build-contrib.xml文件中加入:

   <property name="version" value="http://www.mamicode.com/1.2.1"/>   //value是hadoop的版本号

   <property name="eclipse.home" location="/home/andy/eclipse"/>//location是eclipse的主目录

6. eclipse中右键点击build.xml,执行ant build. 生成的hadoop-eclipse-plugin-1.2.1.jar插件在${hadoop.home}/build/contrib/eclipse-plugin

目录中,将其放入eclipse安装目录的plugins文件夹下,重启eclipse即可.

 

hadoop-1.2.1+eclipse+ubuntu插件编译小记