Java Code to Shut Down Computer

A piece of code that I made that will shut down the computer. What I did was jared it and put it on my desktop, so when I click on it my computer will shut down.

import java.io.IOException;
 class ShutDown {
   public static void main(String[] args) throws IOException{

 	  System.out.println("Good Bye!");
 	  Process p = Runtime.getRuntime().exec("C:/WINDOWS/system32/shutdown.exe -l");
 }
 }

sonia
07.03.26

where i can find a code like that to put it in my myspace page???????

Speed Limit
07.03.26

This is useful.

comments powered by Disqus
Loading