public static void main(String[] args) { Runtime runtime = Runtime.getRuntime(); try { runtime.exec("shutdown -s -t 00"); } catch (IOException e) { e.printStackTrace(); } }
用java编写代码实现关机
最新推荐文章于 2023-04-27 19:35:06 发布
public static void main(String[] args) { Runtime runtime = Runtime.getRuntime(); try { runtime.exec("shutdown -s -t 00"); } catch (IOException e) { e.printStackTrace(); } }