package cn.itcast.www;
import java.io.IOException;
public class StringBufferDemo1 {
public static void main(String[] args) {
Runtime run = Runtime.getRuntime();
Process pro = null;
try {
pro = run.exec("notepad.exe");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
Thread.sleep(5000); } catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
pro.destroy();
}
}
红字的部分为什么可以直接用 |
|