public static void openWinExe() {
Runtime rn = Runtime.getRuntime();
Process p = null;
try {
String command = "notepad";
p = rn.exec(command);
} catch (Exception e) {
System.out.println("Error win exec ");
}
}
public static void openMyExe() {
Runtime rn = Runtime.getRuntime();
Process p = null;
try {
p = rn.exec("\"E:/QQ2008Spring.exe\"");
} catch (Exception e) {
System.out.println("Error my exec ");
}
}
}
Java调用EXE
1027

被折叠的 条评论
为什么被折叠?



