Nutch-Cygwin How to Install JAVA_HOME

I am trying to start Nutch with Cygwin. I'm having problems setting up JAVA_HOME.

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

When I run the 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 seems that the space between the program and the files causes the problem /cygdrive/f/**program files**/java/jdk1.6.0_21

Is there any way to avoid space? Is there a better way to do this? Thanks

EDIT

At the end of the day, I had to reinstall java into another directory without a space in its name.

+6
source share
1 answer

Try using double quotes in:

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

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

 JAVA="$JAVA_HOME"/bin/java 

Hi

+8
source

Source: https://habr.com/ru/post/908803/


All Articles