Sleep Windows from Java

java, sleep, standby, windows

Solution

You can do it by executing a shell command, if you java app has enough rights to do so. The command is...

Runtime.getRuntime().exec("Rundll32.exe powrprof.dll,SetSuspendState Sleep");

That and other commands are shown here.

Problem

Is there command to use on windows from java to make the computer sleep?

Original source