| 1 | {{{ |
| 2 | #!html |
| 3 | <div style="text-align: center; color: blue"><big |
| 4 | style="font-weight: bold;"><big><big> Hadoop Develop </big></big></big></div> |
| 5 | }}} |
| 6 | [[PageOutline]] |
| 7 | |
| 8 | = 目的 = |
| 9 | |
| 10 | 用eclipse編譯hadoop的src |
| 11 | |
| 12 | = 環境 = |
| 13 | |
| 14 | * sun-java6-jdk |
| 15 | * eclipse europa |
| 16 | * 工作目錄於 /home/waue/workspace |
| 17 | |
| 18 | = 方法 = |
| 19 | |
| 20 | {{{ |
| 21 | $ svn co http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.18/ |
| 22 | }}} |
| 23 | |
| 24 | 開啟 eclipse |
| 25 | |
| 26 | file -> new -> project -> java project => next |
| 27 | |
| 28 | project name: brance-0.18 |
| 29 | create project from existing source : /home/waue/workspace/branch-0.18 |
| 30 | |
| 31 | => finish |
| 32 | |
| 33 | 點選branch-0.18 右鍵 -> properties -> builders |
| 34 | |
| 35 | * import -> build.xml |
| 36 | * 取消 java builder 的 勾 |
| 37 | * branch-0.18 build.xml 打勾 |
| 38 | * edit |
| 39 | |
| 40 | properties -> java build path |
| 41 | |
| 42 | * source -> default output folder : branch-0.18/build |
| 43 | |
| 44 | properties -> java compiler |
| 45 | |
| 46 | * compiler level : 6.0 |
| 47 | |
| 48 | => ok |
| 49 | |
| 50 | |
| 51 | build.xml -> run as -> ant build -> |
| 52 | |