Possible Duplicate:
Shutting down a computer using Java
Hi,
I have a Java program that will run 20 times and take around 3 hours to do so. After this, I want my computer to shutdown, or for me to be logged off as a user. Can I do this directly from my program, i.e. directly after the for loop.
for(int i=0; i<20; i++){
//APPLICATION CODE
}
//SHUTDOWN OR LOGGOF CODE
How do I do this?
Thanks!