[jcifs] SmbFile("smb://") problem.
Michael B Allen
mba2000 at ioplex.com
Sat May 29 19:00:42 GMT 2004
David Emo. said:
> Hi, first i'd like to thank for your great job. It's really powerfull and
> usefull.
> I have some problem with the line :
> SmbFile smbf = new SmbFile("smb://");
> smbf.list();
> It causes a exception like that :
> jcifs.smb.SmbException: Failed to connect to server
> java.net.UnknownHostException: ..__MSBROWSE__.<01>
See the FAQ.
>
> I try :
> SmbFile smbf = new SmbFile("smb://MYWORKGROUP/");
> smbf.list();
> It causes a exception like that :
> jcifs.smb.SmbException: smb://MYWORKGROUP/
> java.net.UnknownHostException: MYWORKGROUP
Ditto.
>
> With ;
> SmbFile smbf = new SmbFile("smb://Computer1/");
> smbf.list();
> i got the good result but it misses a directory in the list (a directory
> called "Projets Annexes" and when i do :
> SmbFile smbf = new SmbFile("smb://MYWORKGROUP/Projets Annexes/");
> smbf.list();
You mean "smb://Computer1/Projets Annexes/"?
I cannot be certain without a packet capture [1] but it could be that
either the name has 1 or more Unicode characters or it is the last in a
long list of shares. In both cases the limitations of the NetShareEnum RAP
function may be the cause. Or you're using a particular version of JCIFS
that did not list ATTR_HIDDEN shares. I don't recall that version but that
behavior is not exhibited in recent versions.
Mike
[1] http://jcifs.samba.org/capture.html
More information about the jcifs
mailing list