执行命令部分
try {
String command = "java -version";
Process p = Runtime.getRuntime().exec(command);
StreamCaptureThread errorStream = new StreamCaptureThread(p.getErrorStream());
StreamCaptureThread outputStream = new StreamCaptureThread(p.getInputStream());
new Thread(errorStream).start();
new Thread(outputStream).start();
p.waitFor();
result = command + "\n" + outputStream.output.toString()
+ errorStream.output.toString();
System.out.print(result);
} catch (Exception e) {
e.printStackTrace();
} try {
String co