由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Re: Java里怎么调用unix下的command?
相关主题
怎样用Widget调用command line application,请教一个问题
java socket 问题error of unix redirecting command called by java
java可以调用dll吗?Issue when running a unix command with Runtime.getRuntime.exec()
java 程序中的实时控制新手问为什么java不支持运算符重载呢
Java如何调用MATLAB?关于java runtime class的问题
怎样在JBuilder里输入这样的command?run servlet from command line?
cool JS/UIX问个run java file 的问题
如何用Java去调用一个可执行的C程序?question java command
相关话题的讨论汇总
话题: command话题: java话题: process话题: your话题: 调用
进入Java版参与讨论
1 (共1页)
i*****e
发帖数: 2810
1

Your can use:
Process p = Runtime.getRuntime().exec("your command");
first. Then get IOStream from this process to read/write info.
i*****e
发帖数: 2810
2
It is not so difficult if your command is something like "ls". However,
if you want to keep your child process running and keep on sending it
the command and receiving result, you need to have some trick to
identify the end of the result stream to each specific command.
I remember you can find a Command Console article in javasoft.com site.
Check the Swing Connection and look for article for Swing Text. You will
find it, but it is for some simple command like "ls".
1 (共1页)
进入Java版参与讨论
相关主题
question java commandJava如何调用MATLAB?
Java fun怎样在JBuilder里输入这样的command?
没有java命令怎么执行jar文件阿?cool JS/UIX
Re: 有感于《一个最近完成的JAVA项目的反思》如何用Java去调用一个可执行的C程序?
怎样用Widget调用command line application,请教一个问题
java socket 问题error of unix redirecting command called by java
java可以调用dll吗?Issue when running a unix command with Runtime.getRuntime.exec()
java 程序中的实时控制新手问为什么java不支持运算符重载呢
相关话题的讨论汇总
话题: command话题: java话题: process话题: your话题: 调用