A Windows JDK should be able to access remote SMB shares given the right file syntax.
If the client is something else (like some kind of Unix-ish box) then you'd need to use the jCIFS library (the API of which closely resembles File, FileInputStream and FileOutputStream, so it's easy to use).
Joined: Oct 06, 2007
Thanks the quick reponse. The remote machine is a windows 2003 server. With using the username and password, I get
"Logon failure: unknown user name or bad password"
What is the correct syntax for passing the password and username with the server & files details?
@Rob, I am not passing the domain. Although I saw some examples on the internet where the domain are being passed.
I had solved this problem by mounting the drive. For anyone else wanting to know the solution, I mounted the drive by assigning it an unused drive. I used the process command -
net use F:/servername/shared \user username password
subject: how to read from file from a remote machine