用java编写代码实现关机

public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        try {
            runtime.exec("shutdown -s -t 00");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

猜你喜欢

转载自www.cnblogs.com/BLACKJT/p/12190282.html