New in JDK1.4 is that it uniquely identifies Windows XP.
System.getProperty("os.name") now returns "Windows XP". Ant doesn't expect
this so it makes the wrong system call to retrieve the environment
variables. This throws an exception in the 16 bit MS-DOS Subsystem and
ultimately throws a NullPointerException and causes the build to fail. Patch
to .\src\main\org\apache\tools\ant\taskdefs\Execute.java is attached.

nima.

--- Execute.java.orig   Thu Mar 07 15:35:41 2002
+++ Execute.java        Thu Mar 07 15:38:40 2002
@@ -228,7 +228,7 @@
         }
         else if ( osname.indexOf("indows") >= 0 ) {
             // Determine if we're running under 2000/NT or 98/95
-            if ( osname.indexOf("nt") >= 0 || osname.indexOf("2000") >= 0 ) {
+            if ( osname.indexOf("nt") >= 0 || osname.indexOf("2000") >= 0 || 
osname.indexOf("xp") >= 0) {
                 // Windows 2000/NT
                 String[] cmd = {"cmd", "/c", "set" };
                 return cmd;

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to