ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oisin Kim" <oisin....@aurium.net>
Subject RE: Run time commands
Date Wed, 17 Apr 2002 12:52:49 GMT
Hi Stefan,

Thanks again for your response, if only commercial software had this
sort of support, we'd all be much happier!

I wanted to do inputs using System.in, or from a running class. I was
making an example of taking System.in inputs (which I now know I can't
do!).  I also run a java class that starts (through JNI) a native C++ /
MFC application, this too cannot take in any inputs from users which
seems similar to the System.in problem, but surely we should be able to
give inputs to a running Java program, or am I missing the point of the
exec and java commands in Ant (which I probably am ;-p)
The MFC app runs as a Windows system tray tool, so a little icon appears
in the task bar in windows, which you click to provide inputs. This is
completely unresponsive when run from Ant. It's as if any user input is
banned when using Ant exec or java commands to the resultant running
item (in this case the MFC app).

At the moment I'm using scripts to run the class, which is not very nice
since we've moved all our development over to Ant (from makefile)
without any other problems, we all love it, it has saved us ages in
build times!

So really what I need to know is : 
Is user input not possible when running exec or java commands from Ant?

Thanks again for your help, you have improved even more my views on Ant!

Oisin



-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: 17 April 2002 13:22
To: ant-user@jakarta.apache.org
Subject: Re: Run time commands


On Wed, 17 Apr 2002, Oisin Kim <oisin.kim@aurium.net> wrote:

> I've tried using the exec aommand but the result is exactly the
> same.

Either I don't understand what you want or you didn't understand my
answer - probably both ;-)

> Commandline input is not possible.

What exactly do you mean with command line input?

Reading from System.in?  This is in fact not supported by Ant -
neither for <exec> nor for forked <java> tasks.

Passing parameters on the command line?  This works.

I thought you had an executable that created some output and you want
to use that (the output) as a command line parameter.  Something like

mv `basename $i .bak` $i

which would remove the .bak suffix from $i on a Unix command line.
This can be done with the help of <exec>'s outputproperty attribute.

Stefan

--


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


Mime
View raw message