I have a program that needs to read/write files to/from a network computer. Sometimes however the program cannot access the folder on the network computer. Currently, to fix this issue, I go into windows explorer's network section, click the computer, enter my credentials, and then my program is able to read and write to this computer without a problem. Is there a way to allow Java to ask for these credentials or a way to automatically send these credentials using java? I am using Win7 and Win7 embedded on the network computer.
我有一个程序需要从/从网络计算机读/写文件。但有时程序无法访问网络计算机上的文件夹。目前,要解决此问题,我进入Windows资源管理器的网络部分,单击计算机,输入我的凭据,然后我的程序能够读取和写入此计算机没有问题。有没有办法允许Java请求这些凭据或使用java自动发送这些凭据的方法?我在网络计算机上使用Win7和Win7。
1 个解决方案
#1
0
You can use http://jcifs.samba.org/ which is a library for accessing remote CIFS shares. This allows you to set username and password and works on any platform (not just windows) It works without needing to mount a drive.
您可以使用http://jcifs.samba.org/这是一个用于访问远程CIFS共享的库。这允许您设置用户名和密码并适用于任何平台(不仅仅是Windows)它无需安装驱动器即可运行。
#1
0
You can use http://jcifs.samba.org/ which is a library for accessing remote CIFS shares. This allows you to set username and password and works on any platform (not just windows) It works without needing to mount a drive.
您可以使用http://jcifs.samba.org/这是一个用于访问远程CIFS共享的库。这允许您设置用户名和密码并适用于任何平台(不仅仅是Windows)它无需安装驱动器即可运行。