Ant ignores input from stdin

I am trying to get command line input in a running java program that I started with ant. However, nothing that I type in the terminal is redirected to the System.in the java process. This is normal? I am using Windows 7 and Ant 1.8.2.

Part of the Ant script in question is as follows:

 <target name="run-client" depends="compile" description="Run client."> <java classname="client.Client" fork="true" classpathref="project.classpath"> <arg value="localhost"/> ... other args </java> </target> 
+4
source share
1 answer

Have you tried just using the input or input string from a java task?

http://ant.apache.org/manual/Tasks/java.html

Since this is just the command line you are interested in.

In another case, I do not think that you can interact with a running application.

+3
source

All Articles