aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes networkiing doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "networkiing doubt" Watch "networkiing doubt" New topic
Author

networkiing doubt

vasu chowdary
Ranch Hand

Joined: Mar 15, 2008
Posts: 90
I have four computers with LAN connection.how can i shutdown three computers using single computer.is this happen with java.net package?
T.A. Nguyen
Ranch Hand

Joined: Sep 02, 2008
Posts: 36

It vary. Is this something you like be able to control from Java environment? If not, there are many choice. But, in general, to be able to shut down a machine, you must access the external shut down command come with the operating system. In Java environment you will have to use the Runtime.exec() for the local system being shut down. And use socket or RMI as a vehicle to deliver the remote shut down command to the targeted machine (java server/receiver).

Originally posted by vasu chowdary:
I have four computers with LAN connection.how can i shutdown three computers using single computer.is this happen with java.net package?


T.A. Nguyen
http://ta.cnci.org
http://www.linkedin.com/in/nguyenta
Sachindra Pratap
Ranch Hand

Joined: Jun 03, 2008
Posts: 42
hi,
What i anaylized from your reply is as follows:
On three different machine there would be running client and server both.
But from one machine (through which is want to shutdown other two systems)
Throu the client on A machine ,i would send a request to the other two machine,which would have there own server running.And They would execute,
Runtime.exec(),to shutdown that particular machine.

But my query is ,could there be any way to directly hit shutdown,to remote
machine, through our program.
(may be throuh rmi ,but i don't have any idea about).

So please help in understanding me the situation.
regards,
Sachindra
T.A. Nguyen
Ranch Hand

Joined: Sep 02, 2008
Posts: 36


...
But my query is ,could there be any way to directly hit shutdown,to remote
machine, through our program. (may be throuh rmi ,but i don't have any idea about).


Directly hit the shutdown... I am not sure I understand you correctly, is it the button you want to hit? Or a "shutdown" command you want to activate. They are 2 different things. Now, the "shutdown" command will be vary depend on which operating system. By activating the shutdown does not have the same effect of hitting the "shutdown" button because of the hardware different. In software, Java and other alike, in order for you to shutdown a remote machine, the target machine must be of some sort of server that awaiting for the shutdown command and execute/activate the operating system shut down command.
Sachindra Pratap
Ranch Hand

Joined: Jun 03, 2008
Posts: 42
Thanks for the reply,
well i wanted to activate the shutdown command for remote pc
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: networkiing doubt