Runtime.getRuntime().exec(String command) 应该是可以实现的
Process p = Runtime.getRuntime().exec(String command)
p.getOutputStream()或者getErrorStream() 方法可以得到输出流
通过输出流得到它的输出信息