export JAVA_HOME with spaces in Cygwin
问题 I'm trying to set my JAVA_HOME in Cygwin with this command: export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_10" But when I do cd $JAVA_HOME , I'd get this error: $ cd $JAVA_HOME -bash: cd: /cygdrive/c/Program: No such file or directory I tried quoting, and escaping the space (ie., \ ), but none worked. Any idea what else would? Thanks, 回答1: I faced this problem too and I saw many posts but nothing really worked. There is a small trick that I did and things started working. My JAVA