• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Accessing LAN comps through Java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:

I'm writing an application that scans shared folders on networked computers. I've heard that Universal Naming Convention is an easy and standard way to access LAN computers, but for some reason,
when I declare a File object referencing a LAN computer (i.e. File comp = new File("\\\\samplecomp"); )
I cannot get the program to recognize that this location exists. However, when I specify a particular folder on the LAN computer in the File constructor, I am able to read it perfectly well just like any other File object.

Can anyone tell me how to use UNC to access networked comps in Java? I basically need a way to get a handle on the LAN comp so I can search it for files.

Thanks alot!

- ADH
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
??

If you type 'dir \\samplecomp' at the DOS command line, I don't think it would work either - you need a shared folder name. If you do a search for '\\sampecomp', windows will list the shared folders but I wouldn't be surprised if this was done with some windows api which is not available to third parties.
[ August 09, 2004: Message edited by: Rovas Kram ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic