[jcifs] using jcifs for retrieving shares

Michael B. Allen miallen at eskimo.com
Thu Nov 14 07:31:11 EST 2002


On Wed, 13 Nov 2002 13:51:11 +0200
"Bogdan Cirstea" <bogdanc at graffiti.net> wrote:

> hi!
> i try to get the list of liles shared on a computer in my local network. i us for this: 
> jcifs.smb.SmbFile file = new jcifs.smb.SmbFile("smb://computer_name");
> jcifs.smb.SmbFile file_list[] = file.listFiles();
> 
> but i'be got jcifs.smb.SmbException: Access denied
> 
> do you know how i should do that ?

If  your  URL  refers to a directory, it needs a trailing '/'. Read the API
documentation  for  SmbFile  *for  the  proper version of jCIFS that you're
using*.  Sometimes  the  server  requires  that you set a domain, username,
password. See the Overview page of teh API documentation about how to use a
properties file.

-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 



More information about the jcifs mailing list