ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e <l...@menta.net>
Subject How to Redirect the Input of the Java Task
Date Tue, 11 Jun 2002 01:58:33 GMT
Hello,
Simple, is there any way to redirect the estandar input of a java program 
executed by the Java task?

I've been looking for it, but there's nothing, just a question a year ago 
with no answer :-(
I'm using Ant inside a project, so I've extended some Ant tasks in order to 
work on my way, but I don't know how to change the Java task to do that.

Something like setOutput(output), but for input :-)

I can not use the solution of shell because I would like to use just Java 
everywhere,
<exec executable="sh" dir="">
	<arg value="-c" />
	<arg value="java myJava &lt; input.txt " />
</exec>

I tryied with
	project.setInputHandler(new myFileInputHandler())
but it is never called. The Java program keeps hung waiting I don't know 
what :-)

Any idea will be apreciated :-), or just pointing which class I should look 
for...
Thanks!

* Ermengol *


--
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