定时关机的问题
通过以下方式可以实现关机,但是要指定什么时候关机,怎么办?试了好多次都不行.String cmd[] = { "shutdown", "-s" };
try {
Process ps = Runtime.getRuntime().exec(cmd);
ps.waitFor();
} catch (Exception ioe) {
}
windows 的shutdown 命令不是 shutdown -s -t 3600,但在这里面怎么不行,不能设置t.
----------------解决方案--------------------------------------------------------
已经解决了.
----------------解决方案--------------------------------------------------------