How to reboot a machine from a Java application?.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Sunday, March 17, 2002 03:46 PM

Is there a way to reboot and to turn off a machine from a Java application?. Ilooked for something like that in the System class but found nothing.
Regards,
Juan Pedro

Re: How to reboot a machine from a Java application?.

Posted By:   Tom_Oinn  
Posted On:   Tuesday, April 23, 2002 02:44 AM

Well, given you can (contingent upon the security manager) run arbitrary programs from java via exec() you can create a normal application or script that will shut down the machine and then run it from your java code. This will be easy enough on unix like systems, I'm not sure whether equivalent command line tools exist for others.

Note that this is a horrible horrible thing to want to do in the first place, unless you can absolutely guarantee the security of your systems from outside interference!

Tom

Re: How to reboot a machine from a Java application?.

Posted By:   Prasanna_Varadhan  
Posted On:   Wednesday, April 17, 2002 10:54 AM

You can very easily do that....In your dreams... Well dude first come to grip with the fact that you are working on a VM and you are not allowed to touch any system level resources (like you IVRs and IVTs) you are not allowed to send any system calls or interrupts.. you are better off trying this stunt in a language designed for the purpose of system programming like C.

All the best.
About | Sitemap | Contact