Nutch-Cygwin How to set JAVA_HOME
Asked Answered
A

1

6

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.

Albaalbacete answered 19/2, 2012 at 0:47 Comment(1)
You can use DOS style path: export JAVA_HOME='c:/PROGRA~1/Java/..." Works for me.Benzoate
R
9

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

Rooke answered 19/2, 2012 at 3:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.