我以前也试过这样登录失败,第二天就能登录成功了。
JCIFS是很不稳定的。
如果是域登录可以这样
-
-
- UniAddress dc = UniAddress.getByName(DOMAIN_IP);
- NtlmPasswordAuthentication authentication = new NtlmPasswordAuthentication(DOMAIN_NAME, LOGIN_NAME, PASSWORD);
- SmbSession.logon(dc, authentication);
-
- SmbFile remoteFile = new SmbFile(fileURL, authentication);
JCIFS是很不稳定的
原文:http://www.cnblogs.com/firstdream/p/5191997.html