java从局域网共享目录下载文件
直接贴代码
public static void main(String[] args) throws MalformedURLException {
//smb://xxx:xxx@.../testIndex/
//xxx:xxx是共享机器的用户名密码
//SmbFile smbFile = new SmbFile("smb://域名;登录账号:登录密码@服务器ip/文件夹名称/");
String url="smb://Administrator:Lz8312@192.168.28.56/video/tt.mp4";
SmbFile file = new SmbFile(url);
System.out.println(file);
getFile(url, "D:/log");
}
/**
* 从共享目录下载文件
* @param remoteUrl 共享目录
* @param localDir 本地目录
*/
public static