<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Does that mean Samba is going to be phased out?</span></div><div><br><span></span></div><div><span>Meanwhile, I still want to use it. Is there any thing I can do to make it work today?</span></div><div><span>Thanks.<br></span></div><div><span><br></span></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Christopher R. Hertel <crh@ubiqx.mn.org><br><b><span style="font-weight: bold;">To:</span></b> Andre Li <ndrli@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> "jcifs@lists.samba.org" <jcifs@lists.samba.org><br><b><span style="font-weight:
 bold;">Sent:</span></b> Tuesday, June 28, 2011 9:32 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [jcifs] How to list all computers in LAN?<br></font><br>Andre, and anyone else who is listening.<br><br>Before working out the bugs in the method you are using, it would be very<br>beneficial to understand exactly what it is that this method is trying to<br>accomplish.<br><br>It is looking for all nodes within the broadcast domain that are running the<br>NetBIOS over TCP (NBT) NetBIOS Name Service that are *also* local master<br>browsers for their workgroup/NT-domain *and* are willing to respond to<br>broadcast queries.<br><br>That was never a reliable way to find all of the nodes on a LAN, and it is<br>becoming less so as Microsoft phases out use of the NBT transport.<br><br>Chris -)-----<br><br>Andre Li wrote:<br>> Hi All,<br>> <br>> I tried:<br>> <br>> SmbFile[] domains = (new SmbFile("smb://")).listFiles();<br>> for
 (int i = 0; i < domains.length; i++) {<br>>     SmbFile[] servers = domains[i].listFiles();<br>>     for (int j = 0; j < server.length; j++) {<br>>         System.out.println(server);<br>>     }<br>> }<br>> <br>> But got error:<br>> java.net.UnknownHostException: ..__MSBROWSE__.<01><br>>     at jcifs.netbios.NbtAddress.doNameQuery(NbtAddress.java:317)<br>>     at jcifs.netbios.NbtAddress.getByName(NbtAddress.java:422)<br>>     at jcifs.netbios.NbtAddress.getByName(NbtAddress.java:403)<br>>     at jcifs.smb.SmbFile.getFirstAddress(SmbFile.java:845)<br>>     at jcifs.smb.SmbFile.connect(SmbFile.java:946)<br>>     at jcifs.smb.SmbFile.connect0(SmbFile.java:875)<br>>     at jcifs.smb.SmbFile.doNetServerEnum(SmbFile.java:1907)<br>>     at
 jcifs.smb.SmbFile.doEnum(SmbFile.java:1727)<br>>     at jcifs.smb.SmbFile.listFiles(SmbFile.java:1708)<br>>     at jcifs.smb.SmbFile.listFiles(SmbFile.java:1641)<br>>     at J.main(J.java:10)<br>> When<br>>   SmbFile[] domains = (new SmbFile("smb://")).listFiles();<br>> was called.<br>> <br>> Do I need to initialize/configure the system? How?<br>> <br>> Any information would be appreciated. Thanks in advance.<br>> <br>> <br>>>Michael B Allen miallen at ioplex.com<br>>>Thu Sep 20 06:32:46 GMT 2007<br>>><br>>>    Previous message: [jcifs] How to list all computers in LAN?<br>>>    Next message: [jcifs] How to list all computers in LAN?<br>>>    Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]<br>>><br>>>On Thu, 20 Sep 2007 09:05:23 +0700<br>>>Jakov <giaodichdientu at gmail.com>
 wrote:<br>>><br>>>> Hi there,<br>>>><br>>>> To answer the question, how to list all computers in the LAN, many people<br>>>> told me that I should use JCIFS. I checked all examples in<br>> jcifs-1.1.11.tgz.<br>>>> Looks like there's a file that could help: CheckAllDC.java with<br>>>> NbtAddress.getAllByName() function. But I couldn't make it work. The<br>> error<br>>>> is "java.net.UnknownHostException" with all host I gave it.<br>>>><br>>>> My LAN has many domains, each has many computers. How could I list all of<br>>>> them using JCIFS? Please give me a hint.<br>>><br>>>SmbFile[] domains = (new SmbFile("smb://")).listFiles();<br>>>for (int i = 0; i < domains.length; i++) {<br>>>    SmbFile[] servers = domains[i].listFiles();<br>>>    for (int j = 0; j < server.length; j++) {<br>>> 
       System.out.println(server);<br>>>    }<br>>>}<br><br>-- <br>"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X<br>Samba Team -- <a href="http://www.samba.org/" target="_blank">http://www.samba.org/</a>     -)-----   Christopher R. Hertel<br>jCIFS Team -- <a href="http://jcifs.samba.org/" target="_blank">http://jcifs.samba.org/</a>   -)-----   ubiqx development, uninq.<br>ubiqx Team -- <a href="http://www.ubiqx.org/" target="_blank">http://www.ubiqx.org/</a>     -)-----   <a ymailto="mailto:crh@ubiqx.mn.org" href="mailto:crh@ubiqx.mn.org">crh@ubiqx.mn.org</a><br>OnLineBook -- <a href="http://ubiqx.org/cifs/" target="_blank">http://ubiqx.org/cifs/</a>    -)-----   <a ymailto="mailto:crh@ubiqx.org" href="mailto:crh@ubiqx.org">crh@ubiqx.org</a><br><br><br></div></div></div></body></html>