Notice: Constant WP_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 107

Notice: Constant WP_MAX_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 108
Shutdown windows system in Java - CodesJava

CodesJava

Easy learning with example program codes

Shutdown windows system in Java


Notice: Undefined variable: footnotelist in /home/javawith/public_html/codesjava.com/wp-content/plugins/latex2html/inc/core.php on line 475
import java.io.IOException;
 
public class Test {
  public static void main(String[] args) {
	  try {
		  Runtime.getRuntime().exec("c:\\Windows\\System32\\shutdown -s -t 0");
	} catch (IOException e) {
		e.printStackTrace();
	}
  }
}
Please follow and like us:
error
Posted in Java   

Core Java Tutorial








Copyright © 2019 CodesJava DMCA.com Protection Status