Reputation: 1674
I've got a Java program that saves a new PDF file to a shared network location.
On Windows, it works fine, using backslashes
serverDirName=\\\\10.20.1.1\\c$\\input
To try skip all the complexity of permissions, I've set the sharing on that folder in Windows to Read/Write for "Everyone".
I'd like to try run the program from a linux server.
Straight off the bat, I get:
Error: java.io.FileNotFoundException: \\10.20.1.1\e$\input/8106070121089/Doctor-Diagnosis-201003291.pdf (No such file or directory)
So I tried switching to:
serverDirName=//10.20.1.1/e$/input
and got:
Error: java.io.IOException: Directory '/10.20.1.1/e$/input/8103205007085' could not be created
I presume there's some basic network requirements that I'm lacking, in order to communicate with a Windows machine, but any idea what that is?
(OS is Centos)
Upvotes: 1
Views: 2438
Reputation: 3002
To access windows directory you should mount windows shared directory to your linux server.
See https://wiki.centos.org/TipsAndTricks/WindowsShares
After this you'll be able to use this windows directory as a local linux directory.
Upvotes: 2