1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

Java Interface for writing and reading data on hdfs

You showed us how to copy files from hdfs using the command prompt. I am trying to do the same thing from a java interface. An example is shown in the book: " Hadoop the definite guide" on page 56.
When I run the program, I receive this error:
Exception in thread "main" java.lang.NoClassDefFoundErro: URLCat
Could not find the main class: URLCat. Program will exit.

I have read online for solutions but it is not working. I saved my java codes in a jar file under /cloudera/lib

Can you help me out on this?

1 Answer(s)


hi Yaw,

One reason for "NoClassDef" error is because you are referring to a class with a wrong name. Please check the package name/classfile.


Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)