On the Windows Eclipse write HDFs API program, will encounter two errors, in the online search a lot of information, there is no solution, after a lot of time research, finally solved the problem
The error is 1.java.io.ioexception:hadoop_home or Hadoop.home.dir is not set.
2.java.io.ioexception:could not locate executable D:\hadoop-2.6.4\hadoop-2.6.4\bin/winutils.exe in the Hadoop bin Aries.
, first of all, installation, after the installation and testing, that is the key part, because the error will occur in that, stumped don't know how many people, online a lot of help is not resolved
First of all to install the Eclipse-hadoop-plugin plug-in (installed can skip, directly see the following error is how to solve) need to use the following jar package, the specific use of the package I will upload , will address the end of this article to write
Process to see
Then restart Eclipse, then press action
Then OK
And then press the operation.
Create a location
Edit the Content
When you are finished, you can see the following error (May pop up a dialog box, wrong, no tube, nothing)
Seeing this picture means you're successful.
Then we have to test, how can the test less jar package, look at the diagram below, add jar package to the Hadoop project to
The Ok,jar package was introduced to eclipse and tested, and the focus was on it.
See no, reported a mistake, is not a lot of people have met, see the following solution
Configure some Hadoop_home environment variables, add it to the path system environment variable, see figure
Add%hadoop_home%\bin;%hadoop_home%\sbin to Path; (Note that everyone's decompression path is different, do not do exactly as I do, unless your decompression path and I, my decompression to the D drive)
Restart Eclipse, and then test, notice, again reported a mistake, is not very strange, because a little something, the specific look at the picture
Nothing to add, see the jar package decompression after adding to the extracted file bin directory can be
After you restart Eclipse, run, test
Finally succeeded!!!
A friend who needs a jar pack can go to http://download.csdn.net/detail/tanggao1314/9500056 and http://download.csdn.net/detail/. tanggao1314/9500061 download to find the corresponding package, because the file upload can not be too large, there is a hadoop-2.6.4.tar.gz can not upload, the need for friends can contact me, I sent alone
Dry Goods-install eclipse-hadoop-plugin plug-in and HDFs API programming two important error fixes encountered