bash, javac and that pesky slash.

Kazuhiro Fujieda fujieda@jaist.ac.jp
Mon Jan 24 11:36:00 GMT 2000


>>> On Mon, 24 Jan 2000 09:31:30 -0800
>>> Craig MacFarlane <craigm@chemconnect.com> said:

> Sun's javac, in jdk1.2.1, seems to change the
> forward slashes used by bash to backward slashes
> used by windows.
> 
> e.g.
> 
>   bash-2.02% javac -d //d/destdir/classes foo.java
> 
> produces the error message
> 
>   The \\d\destdir\classes directory does not exist.

You can use a shell script like the following.

#!/bin/sh

params="/jdk1.2.2/bin/`basename '$0'`"
while [ $# -gt 0 ]
do
    if expr "$1" : '-.*' >/dev/null 2>&1
    then
	arg="$1"
    else
	arg=`cygpath -p -w "$1"`
    fi
    params="$params '$arg'"
    shift
done
eval "$params"

____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list