Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / October 2007

Tip: Looking for answers? Try searching our database.

Remote Log Off In Java

Thread view: 
christopher_board@yahoo.co.uk - 25 Oct 2007 14:25 GMT
Hi all, I am currently trying to develop a java application that
allows the user to shutdown or restart a room full of computers at a
time. I would also like the user to have the option to log off the
user on a computer or on multiple computers. The computers are being
shutdown and restarted by using the command prompt, for example,
shutdown -m \\computername -s -t 10 -f. what would be the simplest way
to allow the user to perform a remote log off on a computer.

Any help in this matter would be highly appreciated.

Thank you
Patricia Shanahan - 25 Oct 2007 15:46 GMT
> Hi all, I am currently trying to develop a java application that
> allows the user to shutdown or restart a room full of computers at a
[quoted text clipped - 7 lines]
>
> Thank you

I think you need to divide the problem into two pieces, and solve each
piece before trying to combine the results.

1. Work out exactly what commands you need to issue for each request.
Write Java code to generate List<String> representations.

2. Use ProcessBuilder to run the command interpreter on simple, easily
tested commands. Include capturing and interpreting standard out and
standard error.

Patricia
Greg R. Broderick - 25 Oct 2007 19:32 GMT
christopher_board@yahoo.co.uk wrote in news:1193318701.711667.68540@
22g2000hsm.googlegroups.com:

> Hi all, I am currently trying to develop a java application that
> allows the user to shutdown or restart a room full of computers at a
[quoted text clipped - 5 lines]
>
> Any help in this matter would be highly appreciated.

1.  Java is multi-platform.  What platform(s) are the computers that you are
wishing to shut down/log off?  The steps necessary to shut down and/or log of
a Windows computer are going to be drastically different from the steps
necessary to shut down a Sun Sparcstation, a Mac, or a linux machine.

2.  Google (Groups) is your friend.  You should search this group's archives
for the dozens of queries similar to yours that have been posted within the
past several months.

3.  Is there a particular reason that you're wanting to do this in Java?  
Other languages which are more intimately connected to the Windows API (e.g.
C++, C) are probably much better-suited for this sort of a task, assuming
that all you're wanting to shut down are Windows boxes.

Cheers!
GRB

Signature

---------------------------------------------------------------------
Greg R. Broderick                  usenet200705@blackholio.dyndns.org

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.