正在阅读:windows定时关机程序windows定时关机程序

2004-04-13 12:29 出处:CSDN 作者:gojava 责任编辑:sdq

 public void shutdown() {
        exec("shutdown -S ");
    }

    public void restart() {
        exec("shutdown -R ");
    }

    public void logout() {
        exec("shutdown -L ");
    }

    public static void main(String[] str) {
        if (str.length == 0) {
            System.out.println("-----------------------\n" +
                    "关机  -s\n" +
                    "重起  -r\n" +
                    "注销  -l\n" +
                    "-----------------------\n");
        }
        else{
           try{
               Thread.currentThread().sleep(10000L);
            }
            catch(Exception e){
               CtrWDS.getInstance().exec(str[0]);
            }
         }

     }

 }

 

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品