Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

Kuntal Basu picture Kuntal Basu · Feb 8, 2014 · Viewed 9.6k times · Source

Hi I have just started learing Hadoop. I am following "Hadoop The definitive guide" book. While setting up Hadoop in Window 7 following "Apendix A" of the book, I am getting error

"Error: Could not find or load main class org.apache.hadoop.util.VersionInfo"

when I am running the command

hadoop version

Can anyone have an idea how to correct this or tell me what I am missing? I am using Cygwin64. enter image description here

Answer

Deepak Singhvi picture Deepak Singhvi · May 12, 2014

if you add following line in the end of hadoop-config.sh ( available in HADOOP_INSTALL\libexec), it should work.

CLASSPATH='cygpath -wp "$CLASSPATH"'