A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
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!)
An IDE is no substitute for an Intelligent Developer.
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-2015