how to invoke java.exe in bash under windows in cygwin with space in path
Posted
by Boris
on Stack Overflow
See other posts from Stack Overflow
or by Boris
Published on 2010-06-17T18:04:40Z
Indexed on
2010/06/17
18:33 UTC
Read the original article
Hit count: 211
Hi,
I tried to invoke java inside bash script on windows (Win XP) using cygwin. However path to java.exe contain spaces.
only literaly putting in bash sometghing like this worked:
/cygdrive/c/Program\ Files/Java/jdk1.5.0_10/bin/java -cp "$TOOL_HOME" DateParse "$DATE" "$FORMAT"
My attemts to put java path to a variable failed:
export JAVA_EXE="/cygdrive/c/Program\ Files/Java/jdk1.5.0_10/bin/java"
$JAVA_EXE -cp "$TOOL_HOME" DateParse "$DATE" "$FORMAT"
also different combination with cygpath, quotes, brackets did not work. I am not finding the the right combination
© Stack Overflow or respective owner