Nutch-Cygwin如何设置JAVA_HOME [英] Nutch-Cygwin How to set JAVA_HOME
问题描述
我想用Cygwin运行Nutch。我在设置JAVA_HOME时遇到问题。
i am trying to run Nutch with Cygwin. I am having problems setting the JAVA_HOME.
$ export JAVA_HOME='/cygdrive/f/program files/java/jdk1.6.0_21'
当我运行nutch命令
When i run nutch command
$ bin/nutch crawl
i get
cygpath: can't convert empty path
bin/nutch: line 268: /cygdrive/f/program: No such file or directory
bin/nutch: line 268: exec: /cygdrive/f/program: cannot execute: No such file or directory
似乎程序和文件之间的空间导致问题 / cygdrive / f / **程序文件** / java / jdk1.6.0_21
It appears that the space between program and files causes the problem /cygdrive/f/**program files**/java/jdk1.6.0_21
有没有办法逃避空格?有没有更好的方法来做到这一点?感谢
Is there a way that i can escape the space? Is there a better way to do this? Thanks
EDIT
-install java在另一个目录中,其名称中没有空格。
At the end of the day, i had to re-install java in another directory with no space in its name.
推荐答案
尝试使用双引号:
export JAVA_HOME="/cygdrive/f/program files/java/jdk1.6.0_21"
$ b b
和脚本使用JAVA_HOME变量的位置,例如:
and wherever the script uses the JAVA_HOME variable, for example:
JAVA="$JAVA_HOME"/bin/java
尊敬
这篇关于Nutch-Cygwin如何设置JAVA_HOME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!