Setting env cars AND RUNNING the application is no problem. Only setting the vars and quitting Ant - then the settings are lost.
Jan >-----Ursprüngliche Nachricht----- >Von: Ninju Bohra [mailto:[EMAIL PROTECTED] >Gesendet: Mittwoch, 28. September 2005 22:58 >An: Ant Users List >Cc: Cels M. >Betreff: Re: How to set native OS variables? > > >Oops, you are right... the <sysproperty> element is for >setting JVM system properties (during a <java> >task) >The <env> element of the <exec> is correct > >--- Robert Clark <[EMAIL PROTECTED]> wrote: > >> On Wednesday September 28, 2005 12:57 pm, "Cels M." >> <[EMAIL PROTECTED]> wrote: >> > I need to set the native OS classpath and them >> <exec> an >> > application. I've been reading the ant docs and >> several usenet >> > posts but didn't find a way to do it. It's quite >> simple to retrieve >> > the OS properties but, is there any way to set >> them ? >> >> Its possible to set environment variables passed to <exec>'ed >> processes with nested <env> elements. The documentation for >the <exec> >> task shows a couple of examples. >> >> Something like this should do the trick for you: >> >> <exec executable="something"> >> <env key="CLASSPATH" value="/opt/classes:....."/> </exec> >> >> - Rob >> >> >--------------------------------------------------------------------- >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > > > > > > >__________________________________ >Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] For >additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]