ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Dickon Glanville" <dickon.glanvi...@gmail.com>
Subject Re: how to get a process id from a spawned task?
Date Tue, 29 May 2007 13:58:21 GMT
Thanks.  That helped.  I used the <propertyregex> task from
ant-contrib to retrieve just the process id, and then echoed that to
the user.

Much appreciated.

JDG

On 5/28/07, Prashant Reddy <prashant@pramati.com> wrote:
> If you are OK with using JDK 1.5, you could use 'jps' command that is
> shipped with every JDK.
>
> See : http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html
>
> Output of jps on my computer :
> $ ~/programs/java/jdk1.5.0_10/bin/jps
> 20608 Jps
> 6550 Main
>
> You could perhaps use ANT's <exec> task to run this command.
>
> On Mon, 2007-05-28 at 08:19 -0400, Jay Dickon Glanville wrote:
> > Hello all.
> >
> > Is there a way to get the process id (I'm dealing with a windows
> > system here, but I believe the question could be asked of both windows
> > an UNIX families) of a task that is spawned?  I have a java task:
> >   <java spawn="true" ... />
> > and I'd like to be able to echo the process id to the user (so that
> > they can kill the process if they so desire).
> >
> > Is there a convenient way to get the process id?
> >
> > Thanks
> >
> --
>
> -Prashant
>
> Don't upload, just share : www.dekoh.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Jay Dickon Glanville

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message