[jcifs] newbie problems

Michael B Allen mba2000 at ioplex.com
Mon Jul 18 19:08:46 GMT 2005


On Mon, 18 Jul 2005 12:39:17 -0400
Mark Shifman <mark.shifman at yale.edu> wrote:

> >You don't have a loopback adapter. I've seen this before on
> >Windows machines. Either you need to setup loopback or use the
> >jcifs.smb.client.laddr property to set the address of the interface
> >to use.
> >
> >  
> >
> When I set jcifs.Config.setProperty( "jcifs.smb.client.laddr", 
> "myipaddress" );
> It finally worked. 
> 
> I am running under linx with loopback defined in a standard fashion from 
> ifconfig:
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:104 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:5676 (5.5 Kb)  TX bytes:5676 (5.5 Kb)

Linux ehh? Odd. Something's definately wrong there. Actually I think
there might be something about this in the FAQ.

> >We could put a clause in the code like:
> >
> >  if (localAddr == InetAddress.getLocalHost()) {
> >      socket = new Socket( address.getHostAddress(), port );
> >  } else {
> >      socket = new Socket( address.getHostAddress(), port, localAddr, localPort );
> >  }
> >
> >If you leave out the localAddr and localPort properties alltogether does
> >it work ok?
> >  
> >
> Yes!
> 
> By the way, someone left a
> System.out.print(" " + name );
> in SmbFile.java (at least in the tgz I downloaded) line 1705.

Oh no! Who did that?

:->

JCIFS 1.2.2 coming up .....

Mike


More information about the jcifs mailing list