I exported my Java-Application to a self-running jar-file, then compiled it to an .exe-file using Launch4j.
I figured, that Runtime.getRuntime().exec('shutdown -s -f -t <time in seconds>');
works only if I open the .jar-file from command-line. Running the compiled .exe
from command-line doesn't work.
Why is that and is there any way to execute that command by simply opening the .exe
-file?