Create the class file in MyClass, this MyClass directory is created by itself.
The following error is reported when compiling:
It's obvious that the result of not importing the package
See this API website, you can find the response package, and of course the Java API documentation
Http://hadoop.apache.org/docs/r1.2.1/api/index.html
http://docs.oracle.com/javase/7/docs/api/
By looking for two documents, you need to import
The following package:
However, the error will still be reported as follows:
That's because he couldn't get the files that need to be imported specifically where, through the Search API documentation, it is known that its Hadoop-related classes, tease the presence of the core jar package inside
So there are the following commands:
Look, this compiles successfully.
And then in the run
In this way, you can run the operation successfully, because the classpath is set, so even in other directories can find Urlcat this class.
Where Hadoop's jar packages exist
Using the Java API Action hdfs--read the HDFs file and print