利用Apache Ant編譯Hadoop2.6.0-eclipse-plugin

  環境要求:系統不重要,重要的是要有Ant環境,這裏不作贅述,自行百度配置去。java

  1)在github上下載Hadoop-eclipse-plugin-master的zip包,下載地址git

  2)在Hadoop官網下載Hadoop2.6.0,下載地址github

  3)解壓上述倆壓縮包。apache

  4)在hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin下執行:eclipse

ant jar -Dversion=2.6.0 -Declipse.home=eclipse安裝目錄 -Dhadoop.home=上述Hadoop解壓目錄
個人是:
ant jar -Dversion=2.6.0 -Declipse.home=D:\ProgramFiles\eclipse -Dhadoop.home=D:\Hadoop\hadoop-2.6.0
注意:這邊的目錄不能存在空格!!!

  5)編譯過程當中出現錯誤:oop

compile:
     [echo] contrib: eclipse-plugin
    [javac] D:\Hadoop\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin\build.xml:76: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 45 source files to D:\Hadoop\hadoop2x-eclipse-plugin-master\build\contrib\eclipse-plugin\classes

BUILD FAILED

  查資料發現,原來在javac編譯的時候默認須要設置一個參數includeAntRuntime="false" 如圖:ui

  6)按照這樣的步驟,成功了。spa

相關文章
相關標籤/搜索