[solved?] Re: [jcifs] NbtAddress.getByName() failing when I use a hostname.]

Michael B. Allen mballen at erols.com
Tue Sep 18 18:18:57 EST 2001


On Mon, Sep 17, 2001 at 09:51:16AM -0700, Kammy Wesley wrote:
> We put in ocean.filefish.com.  The NbtAddress is translating that into 
> "OCEAN.FILEFISH."

Ahh, it just hit me. That's not a netbios name so you can't use it
with _NbtAddress). The SmbFile class uses SmbURL to do all that extra name
resolution stuff with DNS and such. Maybe you can do:

NbtAddress a = NbtAddress.getByName((new SmbFile( whatevername )).getServer());

Pretty ugly because it does redundant lookups but the name will resolve
quickly the second time because it would be cached at that point. If
you're working withing the jCIFS package you might hook into the name
resolution code directly. Unfortunately I just don't have the time to
instruct you guys better.

Mike




More information about the jcifs mailing list