获取Windows共享目录文件
2021-11-23 本文已影响0人
ShrJanLan
使用jcifs-1.3.3.jar
String host = "host";
String username = "username";
String password = "password";
String url = "smb:/"+host+"/ShareDirectory";
NtlmPasswordAuthentication npa = new NtlmPasswordAuthentication(host,username,password);
SmbFile file = new SmbFile(url,npa);
System.out.println(file.exists());