ITPub博客

首页 > IT职业 > IT图书 > java执行dos命令学习笔记

java执行dos命令学习笔记

IT图书 作者:sealee 时间:2021-09-09 10:10:32 0 删除 编辑

单例模式使用例子

/**     * @param args     * @throws IOException      */    public static void main(String[] args) throws IOException {        Runtime r = Runtime.getRuntime();           //获取运行时对象        //r.exec("shutdown -s -t 300");  //关闭        r.exec("shutdown -a");  //注销    }

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3355/viewspace-2817685/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-30

  • 博文量
    82
  • 访问量
    620