ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Grey <>
Subject RE: setting environment variables using ant
Date Wed, 08 May 2002 20:49:50 GMT

	The same occurs for JDK 1.3.1.  I implemented a pretty trivial
mechanism to "start"/"kill" processes.  It would execute the process with an
associated key name, and hold the Process object in a Static Map.  The
script continues as normal until you tell it to die using the associated
key.  It doesn't always work that way though, so I added "waitfor"
functionality which would wait for the process to die.  Using RMI I'd tell
the process to exit, then do a "waitfor" to wait for it to actually exit.

	In this case the process is our AppServer which we wrote, so I can
implement/utilize RMI to make the process exit.  It'd be really nice if it
were possible to forcefully kill a process reliably...


-----Original Message-----
From: Hal Hildebrand (web) [] 
Sent: Wednesday, May 08, 2002 4:31 PM
To: Ant Users List
Subject: Re: setting environment variables using ant

The start and forget aspect is a problem with the Java runtime exec, not
Ant.  It's a child process issue in that the parent process death kills
all the children  Strangely, under JDK 1.4 - at least under WinXP/2000 -
I find that runtime exec *does* spawn new processes that don't die when
the parent Java process dies.  This is extremely annoying in the
opposite way.  I launch a bunch of parallel tasks for testing, and if I
^C the parent Ant process, they stick around.

I'm not sure of the "fire and forget" feature of JDK 1.4 - it may only
be a Windows aberration.  But it's a welcome aberration.

So if this *is* consistent and supported behavior across all platforms,
then it's trivial to make a "fire and forget" execute task.

----- Original Message -----
From: "Scott Ganyo" <>

> > classpath it should use. But then again, ANT is not an
> > application launcher
> > either, although it can do it (hangs around, and filters the
> > output though,
> > since the 'start and forget' capability of <exec> doesn't
> > seem to make it
> > into ANT)...
> This is a real shame, too, since I do use Ant to launch applications.
> reason I need to do that is that Ant is the thing that knows how to
> the correct classpath for the applications that it builds for me.)
> Scott

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

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

View raw message