• Post Reply Bookmark Topic Watch Topic
  • New Topic

List Of Computers On Network

 
Ezeilo Uchenna
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How can I get the list(names or IP address) of computer(running NT,Linux e.t.c. )connected to my immediate network.I can use Runtime.exec() to run an OS specific command.But I want to know if I can bypass that.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keeping in mind that I have no networking skills, I was aware that all IPs on our network were within a specific range so I wrote a prog to try to create a java.net.Socket to each IP.
It returned either 1) timeout - nothing on that IP 2) connection refused - machine exists, 3) connection accepted - machine exists.
Once you have a connection t is occasioanlly possible to get things like machine names.
Dave.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!