解决方案
找到hadoop主目录的bin文件夹下的hadoop文件,将倒数第二行
exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"
改成
exec "$JAVA" -classpath "$(cygpath -pw "$CLASSPATH")" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"
就可以了
ps:
我按这个方法解决了
http://*.com/questions/19363402/classpath-issue-in-hadoop-on-cygwin-while-running-hadoop-version-command