Being a newbie here, can you please elaborate a little more on how you
resolved this problem ?


Jay Dickon Glanville wrote:
> 
> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Jay Dickon Glanville
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-get-a-process-id-from-a-spawned-task--tf3827737.html#a11025969
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to