1. Unzip the source first, weWindowsUnder useWinRARPuthadoop-1.1.2.tar.gzUnzip, 1 Figure 1
We focus on folder SRC, browse for this folder, as shown in 2
Figure 2
We need these three folders, and we'll copy the three folders to eclipse in a second.
2. Create a Java project create a Java project from the menu bar in Eclipse, 3 figure 3
My project is called "Hadoopshanghai". On the project you created, right-click to select the last item in the pop-up menu, 4
Figure 4
3. Import the jar package in the pop-up window, select "Java Build Path" On the left, select libraries on the right, then click Add External jars,5 Figure 5
In the pop-up window, import all the jars from the Hadoop source, 6
Figure 6
There is also a ant.jar, also need to hand import.
4. Associated Source code
Then link the source code, select "Source", on the right click "Link source ...", a pop-up window, 7
Figure 7
Click "Browse ..." in the pop-up window to associate the three source packages in Figure 2. As shown in result 8
Figure 8
How do I associate a Hadoop source to eclipse?