Accessing SMB2.1 or SMB3 share from Java?

Moth picture Moth · Jan 5, 2017 · Viewed 22.1k times · Source

As Windows 2012R2 no longer supports the SMB 1 protocol without some registry hacks has anyone had any success working with SMB shares in Java where only SMB 2.1 or SMB 3 are supported?

The JCIFS library is apparently SMB 1 only so it is out. I see that Microsoft have a Java library for Azure but this appears to be utilising services rather than SMB.

Answer

Michael Biniashvili picture Michael Biniashvili · May 23, 2017

I found this package that can work with SMB2 and SMB3, named smbj Take a look at this: https://github.com/hierynomus/smbj