Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nutch-Cygwin How to set JAVA_HOME

Tags:

cygwin

nutch

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'

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

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

At the end of the day, i had to re-install java in another directory with no space in its name.

like image 845
Kennedy Avatar asked Feb 19 '12 00:02

Kennedy


1 Answers

Try to use double quotes in:

export JAVA_HOME="/cygdrive/f/program files/java/jdk1.6.0_21"

and wherever the script uses the JAVA_HOME variable, for example:

JAVA="$JAVA_HOME"/bin/java

Regards

like image 154
Tony Rad Avatar answered Sep 19 '22 12:09

Tony Rad