This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Java Networking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Networking" Watch "Java Networking" New topic
Author

Java Networking

Anirban dutta
Ranch Hand

Joined: Aug 08, 2002
Posts: 89
Dear all,
Can anyone please tell me if there is any way to find the names of all the computers in a LAN through Java API.
Actually I have to make a customized NetSend program for which I have to gather all the computer names in a LAN.
Thanks
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
I'm thinking you might have to resort to performing a "Runtime.exec()" of the "net view" windows command and parse the results to get the computer names (assuming your on windows platform).
[ April 09, 2003: Message edited by: James Swan ]
Anirban dutta
Ranch Hand

Joined: Aug 08, 2002
Posts: 89
Thanks, It worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Networking