public static void closeComputer() {
try {
String cmd = "shutdown -m 192.168.41.76 -s -t 20 -c test"; // 可远程关机
// cmd="at 17:01 Shutdown -s"; //定时17:01分关机,默认30秒
// cmd="shutdown -a"; //取消关机
Runtime r = Runtime.getRuntime();
r.exec(cmd);
} catch (IOException e) {
e.printStackTrace();
}
}
无聊之作。。