ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Davis <pdavis...@attbi.com>
Subject Re: Any Windows experts out there?????
Date Thu, 14 Feb 2002 09:34:56 GMT
Is your PATH set in the system/environment control panel?  If it is, then I 
have no idea.  If not, my guess is that PATH is being set automatically by 
the command prompt (to the current directory?).  Since the service isn't run 
in a shell, it wouldn't have PATH automatically set.  Just my guess.

On Wednesday 13 February 2002 21:25, Kevin Toomey wrote:
> 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}" />
> </target>
>
> 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 ->
> d:\programs\jdk1.3.1_02\bin;d:\programs\jakarta-ant-1.4.1\bin
> [echo] PATH =
> d:\programs\jdk1.3.1_02\bin;d:\programs\jakarta-ant-1.4.1\bin
>
> 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??????
>
>
> Thanks,
> Kevin
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com

-- 
Peter Davis
The second best policy is dishonesty.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message