I'm trying to copy a file from a local directory to a network share on a windows box. I'm using jcifs 1.3.17. I successfully get a connection to the destination, actually create the file there, get a "canWrite" status of "true", but when I try to copy the contents of the local file to the remote file, I get the following error:
jcifs.smb.SmbException: Failed to connect to server
java.net.UnknownHostException: ..__MSBROWSE__.<01>
at jcifs.netbios.NbtAddress.doNameQuery(NbtAddress.java:317)
. . .
code snippet:
SmbFile source = new SmbFile(original);
SmbFile dest = new SmbFile (target,auth);
dest.createNewFile();
boolean canWrite = dest.canWrite();
source.copyTo(dest);
I don't get it... if I can create the file on the destination and smb sees that I can write to it, why does the doCopy fail?