java - Getting a List of computers on a network -


this question has answer here:

i have been trying name or ip of computers on network on in java.

i have tried pinging each 1 2 different ways:

process p = java.lang.runtime.getruntime().exec("ping -n 1 " + host); returnval = p.waitfor(); 

this returns 0 every address when fails.

and

inetaddress.getbyaddress(host).isreachable(timeout); 

always returning false

the computers appear in windows network tab in explorer.

is there way retrieve list of names of computer in java use?

windows?

net view 

or

arp -a 

last 1 gives mac addresses.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -