X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Jerome Fong Subject: how do you create an usable path variable with a space in it? Date: Thu, 08 Mar 2007 12:16:52 -0800 Lines: 30 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I've been trying to create a variable for my Java home (/cygdrive/c/Program\ Files/Java/jdk1.5.0_10). However, no matter how I seem to create it, I am not able to use it. I read some threads that suggest creating a symlink without the space in the path name, but is that my only option? What is weird is, I have set "echo on", the path it uses to find java.exe is correct and if I cut and paste it to the command line, it works. Here is what I did: # create variable export JAVA_HOME='/cygdrive/c/Program\ Files/Java/jdk1.5.0_10' echo $JAVA_HOME /cygdrive/c/Program\ Files/Java/jdk1.5.0_10 "$JAVA_HOME"/bin/java.exe -cp "$CLASSPATH" .... ./test.sh: line 32: /cygdrive/c/Program\ Files/Java/jdk1.5.0_10/bin/java.exe: No such file or directory However, when I copy the command and run it interactive, the command works. I seem to be getting the backslash in the right spot, and it does work interactively. What else should I do? Should I be adding more quotes or something? Any idea what I am doing wrong? thanks, Jerome -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/