i am trying to install hadoop in my windows 7 environment and run it with cygwin. i have downloaded and installed cygwin and have configured ssh i have set java class path inside cygwin .bashrc and set up all hadoop configuration files My .bashrc file is listed
export JAVA_HOME="C:\\Program Files\\Java\\jdk1.6.0_24"
export HADOOP_HOME=/home/user/hadoop
export HADOOP_MAPRED_HOME=/home/user/hadoop
export HADOOP_COMMON_HOME=/home/user/hadoop
export HADOOP_HDFS_HOME=/home/user/hadoop
export YARN_HOME=/home/user/hadoop
export HADOOP_CONF_DIR=/home/user/hadoop/etc/hadoop
but get class not found error when i run the folowing commands the error on cygwin terminal is :
$ ./hadoop version
java.lang.NoClassDefFoundError: org/apache/hadoop/util/VersionInfo
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.VersionInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.apache.hadoop.util.VersionInfo. Program will exit.
Exception in thread "main"
why do i get a noclass definition found error, is there some thing else i need to do with configuration . am using windows 7 64bit and hadoop version 2.2.0
Some tips:
Set the path like this:
Make sure that the export was succesfull by executing:
This should print:
If you want to see the version, just execute:
Run
.sh
scripts withsh -x
: