Thursday 18 July 2013

SHUTDOWN your machine using JAVA.....


copy and paste .....see the magic in xp....after running it wait for 2 mins..i will explain it in my class...for any problem call me 9434226403...

import java.io.*;
class csk
{
  public static void main(String ags[])throws IOException
  {
     Runtime r=Runtime.getRuntime();
      r.exec("shutdown -s");
  }
}

5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Runtime is a class whose execute() method can run any external command or any exe file....

    ReplyDelete
  3. darun jinis toh sir...btw eta windows 8 eo holo...

    ReplyDelete
  4. amar win8 nei bole test kora jai ni...

    ReplyDelete
  5. Works Perfectly in Windows 7, One ques is there any coding for Automatic Timely (pre given input) Start Up of the computer ... UPS will be always on.

    ReplyDelete