Java关机程序

public static void main(String[] args) {
 try {
  Runtime.getRuntime().exec(shutdown.exe -s -t 10);
 } catch (IOException e) {
   TODO Auto-generated catch block
  e.printStackTrace();
 }
}


 

你可能感兴趣的:(Java)