Since this doesn't have anything to do with this forum (i.e. Swing/JFC/AWT), I'm moving this to the "Sockets and Internet Protocols" forum. Though, without some clarifying information, your question still doesn't have a good chance of being answered... [ December 23, 2003: Message edited by: Nathan Pruett ]
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Probably has something to do with this post.. There is no functionality built into Java which will tell you the IP or hostname of every computer on a network. Windows makes use of platform-specific protocols to accomplish this feat.
Originally posted by Adrian Yan: The only way I can think of is using subnet scan, which scans your network for any responding pcs.
If you plan on doing this, definately clear it with your organization's network and security people first. Nothing makes network people jumpier than someone scanning the entire range of IP's. What you probably should be doing, since you are working on a chat program, is use TCP/IP the way it was ment to be used, and have the client register with the server rather than the other way around.
Joined: Nov 15, 2003
thanks all. i did it by executing net view command through java and checked whether it is running by getByName method if any machine is down exception occures and .....