Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

networkiing doubt

 
vasu chowdary
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
Eclipse IDE Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sachindra Pratap
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
Eclipse IDE Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

...
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply,
well i wanted to activate the shutdown command for remote pc
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic