//******************Start**************************
import java.io.*;
/**
*
* @author HP
*/
public class Shut_Down_Computer {
public static void main(String args[]) throws IOException
{
Runtime runtime = Runtime.getRuntime();
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter No. of Seconds after which You want your Computer to Shutdown :");
long a=Long.parseLong(br.readLine());
Process proc = runtime.exec("shutdown -s -t " +a);
System.exit(0);
}
}
//******************End***************************
import java.io.*;
/**
*
* @author HP
*/
public class Shut_Down_Computer {
public static void main(String args[]) throws IOException
{
Runtime runtime = Runtime.getRuntime();
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter No. of Seconds after which You want your Computer to Shutdown :");
long a=Long.parseLong(br.readLine());
Process proc = runtime.exec("shutdown -s -t " +a);
System.exit(0);
}
}
//******************End***************************
No comments:
Post a Comment
Welcome, happy learning