java实现自动关机功能

java实现自动关机功能

    public static void main(String[] args) throws IOException {
    
    
        //设置自动关机,1000秒(1小时)
        Runtime.getRuntime().exec("shutdown -s -t 3600");
        //取消关机
        Runtime.getRuntime().exec("shutdown -a");
    }

猜你喜欢

转载自blog.csdn.net/qq_42805101/article/details/110891651
今日推荐