Search code examples
javapasswordsjava-native-interfacecredentialsunc

Connecting to password protected UNC using Java


I need to copy files to and from some windows network share, like \\compname\admin$ for example. Right now we use JNI and open a connection using WNetAddConnection2 and then WinAPIs CopyFile to operate.

Source machine has Windows OS.

Isn't there another simpler Java way?


Solution

  • JCIFS is an Open Source client library that implements the CIFS/SMB networking protocol in 100% Java.