ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Burton" <bi...@progress.com>
Subject Re: Seaparate command window
Date Mon, 26 Feb 2001 20:49:26 GMT
Hello Stacie,

The Execute class normally writes to and reads from any sub process which
causes the waiting.  I came up with a patch for 1.3beta to allow the
<exec> tag to support detaching the running process, either writing the
output to a file or starting a new console window.   However, since then,
some other patches have been applied which conflict with this patch.  I'm
in a bit of a crunch right now but hope to post a revised patch to ant-dev
in about a week.  Hopefully this or similar functionality could be
included in Ant 1.4 or whatever the next release is named.

One possible way to work around the current Ant limitation of hanging onto
the file handles is to execute a Windows GUI program which in turn runs
the server in a new console window.  Since you're running Windows 2000, it
comes with Windows Scripting Host (WSH).  You could write a simple JScript
or VBscript script that does a Shell.Run ... and execute that script with
wscript.exe.  For more information on WSH, see
http://msdn.microsoft.com/scripting/windowshost/.  I've not actually
tested this so YMMV.

-Bill

"Clark, Stacie" wrote:
> 
> I would like to use Ant to start a server in a separate command window
> before running another task that uses that server. I am able to start the
> server, but I cannot get access to the command window to stop it. How do I
> run a separate window? I have tried starting the server as a java task with
> fork set true, and I have tried using the exec task and starting the server
> from a bat file.  No go. I am using Ant 1.2 (oct 24, 2000), jdk 1.3 and
> windows 2000.  Ihave tired it command line and also from NetBeans.
> 
> Thanks,
> 
> Stacie Clark
> C. C. Pace
> sclark@ccpace.com
> Phone 703-631-6600 ext 419

Mime
View raw message