hadoop eclipse plugin的生成
2013-10-14 15:08
387 查看
参考:http://trac.nchc.org.tw/cloud/wiki/waue/2010/0211
http://gushuizerotoone.iteye.com/blog/638480 http://whxhz.iteye.com/blog/1609218 可能有时候因为eclipse版本或者操作系统版本的问题使得hadoop 提供的 eclipse
plugin不太好用。可以自己生成
1.修改$HADOOP_HOME/src/contrib/build-contrib.xml
增加一行::<property name="eclipse.home"
location="/opt/eclipse"/>
上句后面的/opt/eclipse 由自己的$ECLIPSE_HOME代替
2.修改
$HADOOP_HOME/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java
注释掉原来的//import
org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut;
改为import
org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut;
3.执行:
cd $HADOOP_HOME
ant compile
ln -sf $HADOOP_HOME/docs $HADOOP_HOME/build/docs
ant package
4.在执行最后一句的时候会遇到问题:build.xml:908: 'java5.home' is not defined.
Forrest requires Java 5. Please pass
-Djava5.home=<base 5="" distribution>
to Ant on the command-line.
说没有define java5的home目录,因为我装的是java6
安装jdk1.5
再去下一个apache-forrest-0.9:http://forrest.apache.org/mirrors.cgi For UNIX
operating systems: apache-forrest-0.9-sources.tar.gz
解压后,(如我放在 /opt/apache-forrest-0.9)
则重新执行命令:ant package -Djava5.home=/opt/jdk1.5_22
-Dforrest.home=/opt/apache-forrest-0.9
注意上面的java5路径和apache-forrest路径要根据你自己的安装路径而设定,按上述方法由出现forrest的问题,遂采用步骤5
5.做法是对$HADOOP_HOME目录下的build.xml文件进行修改,两句注释掉,修改成如下所示:
<target
name="forrest.check" unless="forrest.home"
depends="java5.check">
<!--fail
message="'forrest.home' is not defined. Please pass
-Dforrest.home=<base of Apache Forrest
installation> to Ant on the command-line."
/-->
</target>
<target
name="java5.check"
unless="java5.home">
<!--fail
message="'java5.home' is not defined. Forrest
requires Java 5. Please pass
-Djava5.home=<base of Java 5
distribution> to Ant on the command-line."
/-->
</target>
ok,应该会在$HADOOP_HOME/build/contrib/eclipse-plugin/hadoop-0.20.3-dev-eclipse-plugin.jar
修改名字为hadoop-0.20.2-eclipse-plugin.jar。
http://gushuizerotoone.iteye.com/blog/638480 http://whxhz.iteye.com/blog/1609218 可能有时候因为eclipse版本或者操作系统版本的问题使得hadoop 提供的 eclipse
plugin不太好用。可以自己生成
1.修改$HADOOP_HOME/src/contrib/build-contrib.xml
增加一行::<property name="eclipse.home"
location="/opt/eclipse"/>
上句后面的/opt/eclipse 由自己的$ECLIPSE_HOME代替
2.修改
$HADOOP_HOME/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/launch/HadoopApplicationLaunchShortcut.java
注释掉原来的//import
org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut;
改为import
org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut;
3.执行:
cd $HADOOP_HOME
ant compile
ln -sf $HADOOP_HOME/docs $HADOOP_HOME/build/docs
ant package
4.在执行最后一句的时候会遇到问题:build.xml:908: 'java5.home' is not defined.
Forrest requires Java 5. Please pass
-Djava5.home=<base 5="" distribution>
to Ant on the command-line.
说没有define java5的home目录,因为我装的是java6
安装jdk1.5
再去下一个apache-forrest-0.9:http://forrest.apache.org/mirrors.cgi For UNIX
operating systems: apache-forrest-0.9-sources.tar.gz
解压后,(如我放在 /opt/apache-forrest-0.9)
则重新执行命令:ant package -Djava5.home=/opt/jdk1.5_22
-Dforrest.home=/opt/apache-forrest-0.9
注意上面的java5路径和apache-forrest路径要根据你自己的安装路径而设定,按上述方法由出现forrest的问题,遂采用步骤5
5.做法是对$HADOOP_HOME目录下的build.xml文件进行修改,两句注释掉,修改成如下所示:
<target
name="forrest.check" unless="forrest.home"
depends="java5.check">
<!--fail
message="'forrest.home' is not defined. Please pass
-Dforrest.home=<base of Apache Forrest
installation> to Ant on the command-line."
/-->
</target>
<target
name="java5.check"
unless="java5.home">
<!--fail
message="'java5.home' is not defined. Forrest
requires Java 5. Please pass
-Djava5.home=<base of Java 5
distribution> to Ant on the command-line."
/-->
</target>
ok,应该会在$HADOOP_HOME/build/contrib/eclipse-plugin/hadoop-0.20.3-dev-eclipse-plugin.jar
修改名字为hadoop-0.20.2-eclipse-plugin.jar。
相关文章推荐
- windows&nbsp;系统下&nbsp;eclipse环境提交Ha…
- Eclipse 快捷键使用过程中遇到的两個小问题
- poi 下载excel
- java中for循环冒号用法
- Android 开发之Eclipse Debug调试详解
- java import 一个自己写的类 比如Jam 怎么写
- java基础语法
- java 实现图片的任意拖动
- java gc机制
- myeclipse工具栏给隐藏掉怎么显示出来
- java基础数据类型的相互转换以及final关键字
- Spring入门(一)
- java基础数组的定义与初始化以及集合框架的应用
- java基础类,对象,方法以及三大特性
- java基础条件判断循环语句
- SpringBatch之固定长格式文件读写
- Spring面向切面的简单示例(基于XML文件配置)
- java基础数据类型
- 拓扑排序 (java)
- java Collections学习