Bug 8380 - Execute.getProcEnvCommand() failed on Windows XP with jdk 1.4.0
Summary: Execute.getProcEnvCommand() failed on Windows XP with jdk 1.4.0
Status: RESOLVED DUPLICATE of bug 6456
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.4.1
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-22 20:58 UTC by Stefan Hedtfeld
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Hedtfeld 2002-04-22 20:58:13 UTC
With jdk 1.4.0 and ant 1.4.1 on Windows XP build file entry

  <property environment="env"/>

failed. Sourcecode inspection showed why: the os.name property is only 
interpreted correctly for nt and 2000, otherwise is thought of win 9x.

In sources from Oct. 11th 2001 you have to alter the Execute class like

231,232c231,232
<             if ( osname.indexOf("nt") >= 0 || osname.indexOf("2000") >= 0 || 
osname.indexOf("xp") >= 0) {
<                 // Windows 2000/NT/XP
---
>             if ( osname.indexOf("nt") >= 0 || osname.indexOf("2000") >= 0 ) {
>                 // Windows 2000/NT

This helped.

BTW: using jdk 1.3.1_03 worked on the same machine as that returns Windows 2000 
as os.name!
Comment 1 Steve Loughran 2002-04-22 21:29:25 UTC
fixed many months ago, with a pointer to the fact on the ant news page. 

*** This bug has been marked as a duplicate of 6456 ***