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
Post a Comment