Do you know How To Shutdown The Computer from Java Code? OK. the way is very easy, you just run this code to shutdown the computer Runtime ...
Do you know How To Shutdown The Computer from Java Code?
OK. the way is very easy, you just run this code to shutdown the computer
Runtime runtime=Runtime.getRuntime();
try{
wait(10);
Process proc=runtime.exec("shutdown -s -t 0");
}catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
.. then try to run.....
![]() |
How To Shutdown the computer from java code |