Browse the Network Neighbourhood using Java?
1 posts in topic
Flat View  Flat View

Posted By:   James_Sugrue
Posted On:   Monday, September 10, 2001 01:06 AM

I need to view a list of all IP addresses of other workstations on my NT Network Neightbourhood.

I presume I need to first find out what my servers IP address is, and then find out all the machines which are hooked up to it.

If anyone can work out how to do this, please let me know..


Re: Browse the Network Neighbourhood using Java?

Posted By:   Christopher_Pickslay  
Posted On:   Tuesday, September 11, 2001 10:52 PM

I'm not on an NT network right now to test this with, but presumably you could do something like this:

Process proc = Runtime.exec("cmd.exe /C net view");
InputStream in = proc.getInputStream();

You might then have to parse the output and find the IP addresses using nslookup.exe or ping.exe. This article discusses some pitfalls around Runtime.exec().
About | Sitemap | Contact