CodesJava

Easy learning with example program codes

Shutdown system in Java


import java.io.IOException;
 
public class Test {
  public static void main(String[] args) {
	  try {
		  Runtime.getRuntime().exec("shutdown -s -t 0"); 
	} catch (IOException e) {
		e.printStackTrace();
	}
  }
}
Please follow and like us:
Posted in Java   


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki