由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - How to redirect standard input in java
相关主题
Question on Security Constraint @web.xmlTomcat用一阵之后就不行了?
tomcat连接mysql求助JSP程序中如何在客户端启动另外的JAR程序
Multi-tenant SaaS 的2种部署方式使用eclipse方法对第三方库建立Wrapper的小技巧。
Re: What is wrapper class? Thx.请问protected的使用
is there anyway that i can return...jsp 的表,大家都怎么实现?
Question about Java (urgent) -thanksMade my first Ajax app integrated to Spring.
Can Java call C libraries?Interesting: LimpidLog
Java大侠们:Hashtable help please!Classpath questions
相关话题的讨论汇总
话题: java话题: input话题: redirect话题: myapp话题: standard
进入Java版参与讨论
1 (共1页)
d*r
发帖数: 238
1
I have a test file with the input data as standard input.
In C, I can use < to redirect, like: myapp < test
How do to it in java? Use java myapp < test?
z****g
发帖数: 2497
2
A workaround is made a wrapper for it.
The wrapper read the file line by line and send to your main program.
You still call
"java myapp test"

【在 d*r 的大作中提到】
: I have a test file with the input data as standard input.
: In C, I can use < to redirect, like: myapp < test
: How do to it in java? Use java myapp < test?

g*****g
发帖数: 34805
3
What kind of input do you need? Just place them after Java myapp,
and they are available as args[i].

【在 d*r 的大作中提到】
: I have a test file with the input data as standard input.
: In C, I can use < to redirect, like: myapp < test
: How do to it in java? Use java myapp < test?

1 (共1页)
进入Java版参与讨论
相关主题
Classpath questionsis there anyway that i can return...
displaytag export跟tiles的问题Question about Java (urgent) -thanks
问题:Service script for Java app on UnixCan Java call C libraries?
How to make JBoss or Tomcat to be a service?Java大侠们:Hashtable help please!
Question on Security Constraint @web.xmlTomcat用一阵之后就不行了?
tomcat连接mysql求助JSP程序中如何在客户端启动另外的JAR程序
Multi-tenant SaaS 的2种部署方式使用eclipse方法对第三方库建立Wrapper的小技巧。
Re: What is wrapper class? Thx.请问protected的使用
相关话题的讨论汇总
话题: java话题: input话题: redirect话题: myapp话题: standard