File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Linux / UNIX
How to shutdown the red hat linux computer
Joined: Dec 14, 2010
Feb 09, 2011 22:01:10
hi everybody i want to write simple
program which shutdown the my computer
is this possible in java ?
please suggest me i am searching for it
Joined: Jun 25, 2001
Feb 10, 2011 05:34:07
You can use Runtime.exec() to execute the "/sbin/shutdown" command.
However, the Java program has to be running with root privileges. Not just anyone is allowed to shut down the system (fortunately!)
Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: How to shutdown the red hat linux computer
startup and shutdown WebLogic
Boot in java
Windows 2000 Plateform...
SHUT DOWN SYSTEM USING JAVA PROGRAM
Detect windows shutdown
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014