network name not found

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

network name not found

Samba - jcifs mailing list

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