Shutdown windows with java?
You can actually shutdown windows with java using java’s java.lang.Runtime class.
Runtime.getRuntime().exec(String command); is like the ‘Run’ command prompt in windows (Windows key+’r’).
To call shutdown, the code is simply Runtime.getRuntime().exec(“shutdown -s -t 180″);
The number 180 is the amount of time allowed in seconds before the system shutsdown. So set it to 0 for immediate shutdown. In [...]
