ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Tilly <>
Subject RE: Anyone run Cygnus Win32 tools?
Date Mon, 30 Oct 2000 14:59:27 GMT
The other issue stems from cygwin's "hidden" filesystem.  For doing strictly
Unix things on Windows, this has been great, but for trying to use it as my
basic general shell has been disappointing.  The point about how Win32
programs interpret command line strings differently is just one of many
examples where the two simply don't mix.  I've gotten pretty good with batch
commands and all the Win32 tweaks to make cmd work better and that has made
the most benefit to my work.


-----Original Message-----
From: Weiqi Gao []
Sent: Friday, October 27, 2000 10:52 PM
Subject: Re: Anyone run Cygnus Win32 tools?

Peter Donald wrote:
> could someone who runs win32 and has cygnus installed check if the
> following will actually work. I had a request for this but I don't use the
> platform so .... ;)
> ----Change <jakarta-ant>/bin/ant----
> if [ "$CLASSPATH" != "" ] ; then
>   if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
>      CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
>   fi
> fi# convert the existing path to unix

The cygwin platform is a tricky situation in that Cygwin makes most
thing Unixish, yet the JDK remains a Windows JDK (I'm using the Sun JDK
1.3 for Windows, other brand of compilers may behave differently).  The
java command in the JDK expacts classpaths to be a semicolon-separated
list of directories and jar files or zip files.  The above fragment
attempts to turn the classpath into a colon-separated list, which will
for sure confuse javac.

On my machine, with the above patch, the final command executed is:

java -classpath .:/cygdrive/d/Program

1.  The lack of double quotes arround the entire classpath.
2.  The presence of the funny looking /cygdrive/d/ deal, cygwin's name
for D:\
3.  The d:\opt\ant-1.2/lib/jaxp.jar entry.  The java command would have
been OK with this has the path separator been the semicolon.  (It
doesn't care which way the slash goes.)  This is the part that is build
with the help of a  | tr " " ":".

The Conclusion: Use the ant.bat that is provided.  If you don't want to
type the .bat part, which Cygwin forces you to type, you can always
create a symbolic link named ant that points at ant.bat, which,
fortunately, Cygwin allows you to do.

Weiqi Gao

View raw message