Nutch-Cygwin如何设置JAVA_HOME [英] Nutch-Cygwin How to set JAVA_HOME

查看:162
本文介绍了Nutch-Cygwin如何设置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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆