Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

socket method for all login systems

 
feroz muhamed
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
please let me know if any method in Java to know all the machines log on to a network.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Joe Ess
Bartender
Pie
Posts: 9259
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way I can think of is using subnet scan, which scans your network for any responding pcs.
 
Joe Ess
Bartender
Pie
Posts: 9259
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
feroz muhamed
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic