try { Runtime.getRuntime().exec("shutdown /r /t 1"); } catch (IOException ex) {}
Tutorials, tips and tricks about java programming language. Answers for many doubts about java programming language. Answering many howtos. Sample java projects and source code, java games, java programs for java practical labs.
Search This Blog
Showing posts with label restart. Show all posts
Showing posts with label restart. Show all posts
Java Code to Restart Windows
Are you thinking how to restart Windows from Java. You can restart Windows operating system by executing a system command. You can restart windows by executing the system command shutdown /r /t 1. The following Java code will restart the windows computer when executed.
Subscribe to:
Posts (Atom)