Do not miss any new update

How to Write a java Program to Hibernate or Shutdown Windows

Posted by aamir khan


So here we are with a Simple java Code that will Hibernate your Windows

 package practice;
 import java.io.IOException;
 /**
 *
 * @author Aamir khan @hacktw
 */
 public class Hibernate {
 public static void main(String[] args) throws IOException {
   Runtime r = Runtime.getRuntime();
         r.exec("shutdown /h");
}
}

you can  use "shutdown -s" for Shutdown and "shutdown -r" for Restart

{ 0 comments... read them below or add one }

Post a Comment

What you Says

..-

Related Posts Plugin for WordPress, Blogger...

If you like this blog,then link back to me.
This is what you will see.



Optionally use this Widget installer to add this link to your blogger blog.