I am following the book Hadoop: the definitive Guide.
I am confused on example 3-1.
There is a Java source file, URLCat.java.
I use javac to compile it into URLCat.class, then use jar to wrap it into a jar.
The book said to use
% hadoop URLCat hdfs://localhost/user/tom/quangle.txt
to run it. I have tried a lot of different ways, such as
% hadoop jar URLCat.jar .......
but didn't work. I got errors like this:
Exception in thread "main" java.lang.ClassNotFoundException: hdfs://localhost/user/username/quangle/txt
What is the reason for this, and how do I do it right?