用java编写代码实现关机

public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        try {
            runtime.exec("shutdown -s -t 00");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
posted @ 2020-01-14 09:05  是馄饨呀  阅读(1116)  评论(0编辑  收藏  举报