/*
* runtime 运行可执行程序 打开doc文档
*/
import java.io.File;
import java.io.IOException;
public class RuntimeTest {
public static void main(String[] args) {
Runtime run = Runtime.getRuntime();
//File file = new File("c://QQ.exe");
String str = "D://Program Files//QQ//QQ.exe";
String str2 = "cmd.exe /c start c://test.doc";
try {
run.exec(str);
run.exec(str2);
/*File file2 = new File("c:/windows","NOTEPAD.EXE");
run.exec(file2.getAbsolutePath());*/
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}