Hi Midhun,
i will give idea regarding this problem.copy the java folder from program files and paste it from cygwin drive like(/usr/local/java).then follow the below steps in cygwin
2.vi .bashrc(add the below two lines at the end of the file)
export JAVA_HOME="/usr/local/java"
export PATH="$PATH;$JAVA_HOME/bin"
3. source .bashrc
4.go to hadoop configuration folder
5.vi hadoop-env.sh(edit the below line like this)
export JAVA_HOME="/usr/local/java"
6.go to bin foolder in hadoop
7. vi hadoop(edit the below lines)
CLASSPATH=`cygpath -wp "$CLASSPATH"`
Thanks and Regards
R.srinivasan