ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee <>
Subject BUG: uses NT-specific code, breaks on Win98
Date Fri, 14 Jul 2000 08:58:22 GMT
We've encountered an Ant bug over in JDOM land.  I'm stumped on how to
fix it.

Briefly, assumes that "windows" means "Windows NT" and
invokes System.exec with a command line that breaks on Windows 95/98.

----- Forwarded message from Jason Hunter <> -----

The issue is that the Ant task uses the "cmd" syntax as a way
of handling change of directory duties:

        if (myos.toLowerCase().indexOf("windows") >= 0) {
            if (!dir.equals(project.resolveFile(".")))
                command = "cmd /c cd " + dir + " && " + command;

This codepath has probably never before been exercised on Win98 because
it seems to occur only when a "cd" is necessary.  The original developer
probably used NT to test, and I did likewise for the jdom-contrib area.


At the very least, it should use the %COMSPEC% environment variable to
identify or cmd.exe as appropriate.  But even that won't
fix it, since "&&" syntax is not supported in

Good luck! Please let me know if you make any progress fixing this.

 - Alex

Alex Chaffee             
jGuru - Java News and FAQs
Creator of Gamelan       
Founder of Purple Technology
Curator of Stinky Art Collective

View raw message