Your can use: Process p = Runtime.getRuntime().exec("your command"); first. Then get IOStream from this process to read/write info.
i*e
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".