Results 1 to 2 of 2

Thread: Shutdown computer

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2005
    Posts
    167

    Question Shutdown computer

    How can I use Java code to shutdown or restart a computer?

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Shutdown computer

    Never tried it but it's supposed to work
    Code:
    Runtime.getRuntime().exec("Shutdown -s");
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width