command这个命令执行之后,看不到dos命令打开,怎样可以看到dos的界面,并输入命令呢?
public static void main(String[] args) {
String command="c://Windows//system32//cmd.exe";
String command2="c://Windows//system32/notepad.exe";
String command3="C://Program Files (x86)//Tencent//QQ//Bin//QQScLauncher.exe";
try {
Runtime.getRuntime().exec(command);
Runtime.getRuntime().exec(command2);
Runtime.getRuntime().exec(command3);
} catch (IOException e) {
e.printStackTrace();
}
}
|
|