Java 版 (精华区)
String strCommand;
String cmd = "cmd";
if (! System.getProperty("os.name").equals("Windows NT"))
cmd = "command";
cmd = cmd + " /c " + strCommand;
try {
Runtime.getRuntime().exec(cmd);
}
catch (IOException ex) {
}
strCommand 为命令串,DOS 底下怎么用,这儿就可以怎么用
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:4.916毫秒