Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

networkiing doubt

 
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?
 
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?

 
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
 
This tiny ad is wafer thin:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic