jcifs - Login on smb with java -
i'm trying list of files of smb-share secured user , password. working perfectly. if try open file on smb-share, windows requires me login again in prompt. have required username , password. can login in code before opening file?
accessing files jcifs:
ntlmpasswordauthentication auth = new ntlmpasswordauthentication( rootfolderpath, user, passwort); smbfile smbserver; try { smbserver = new smbfile("smb://" + rootfolderpath, auth); } catch (malformedurlexception e) { e.printstacktrace(); continue; } catch (smbexception e) { e.printstacktrace(); }
a solution usage of "net use"
Comments
Post a Comment