ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rollo, Dan" <>
Subject RE: Any Windows experts out there????
Date Thu, 14 Feb 2002 16:13:21 GMT
Hi Kevin,

Not sure if it's the same on W2K, but on NT we had problems with the
capitalization of the PATH environment variable and tcsh. Basically, we had
to use the equivalent of ${myenv.Path} from a DOS shell, but if running from
within tcsh, we could only read the path in Ant using ${myenv.PATH}, still
dunno why.

Our solution was to add the following property, which only sets the
${myenv.Path} if it was not readable using "Path":
<property name="env.Path" value="${env.PATH}"/>

Hope this helps,

-----Original Message-----
From: Kevin Toomey []
Sent: Thursday, February 14, 2002 12:27 AM
Subject: Any Windows experts out there????

Does anyone know why Ant running under a Service on W2K might not have
access to all environment variables (specifically Path)?

The following target gets different results depending on if it is run
from a command prompt or within a service:

<target name="testpath" >
<property environment="myenv" />
<echo message="PATH = ${myenv.Path}" />

If I run Ant in a command prompt, I get:

[property] Loading Environment myenv.
Setting project property: myenv.HOMEDRIVE -> c:
Setting project property: myenv.JAVA_HOME -> d:\programs\jdk1.3.1_02
Setting project property: myenv.Path ->
[echo] PATH =

If I run Ant from within a Service, I get:

Setting project property: myenv.JAVA_HOME -> d:\programs\jdk1.3.1_02
(all the same properties from above, except for Path)

Property ${myenv.Path} has not been set
[echo] PATH = ${myenv.Path}

Any ideas?????? 


Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom 
it is intended, even if addressed incorrectly. If you received this e-mail 
in error, please notify the sender; do not disclose, copy, distribute, or 
take any action in reliance on the contents of this information; and delete 
it from your system. Any other use of this e-mail is prohibited. Thank you 
for your compliance.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message