开发者

Ant ignores input from stdin

I'm trying t开发者_运维知识库o get command line input into a running java program that I started with ant. However, nothing of what I type in the terminal is redirected to System.in of the java process. Is this normal? I'm using Windows 7 and Ant 1.8.2.

The part of the ant script in question goes like this:

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


Did you try simply using the input or inputstring from the java task?

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

Since it's only the command line you are interested in.

In other case I don't think one is able to interact with a running application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜