[jcifs] network name not found

Steve Pruitt bpruitt at opentext.com
Mon Dec 11 15:27:26 UTC 2017


I am getting started with jcifs.  I am hitting what seems to be a newbie issue.  jcifs.smb.SmbException: The network name cannot be found.
I am starting off with a hello world based on the Example - List.java

There seems to be many ways to initialize the SmbFile.  I am having trouble determining if its my SmbFile or environment issue on the host I am trying to hit.
My context:

List files on a shared folder.  The folder has been set to Shared for my user id.  The Network path is \\SPWV01\Servers .  The target machine is a VM running Windows Server 2012.

I tried this, but I get the error above.

NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("mydomain", "mysuser", "mypw");
String sPath = "smb://target IP/SPWV01/Servers/";
SmbFile file = new SmbFile(sPath, auth);

I have tried the fully qualified host name first and then tried the IP address.

Thanks in advance.

-S

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20171211/48bcbc73/attachment.html>


More information about the jCIFS mailing list