Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to access network folder

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

Does anybody know what could be the way to access a network folder? I need to access an unix folder from a java 1.4 program and then read a specific file from that folder. I tried to read some chapters about networking or I/O where they use network socket for this purpose. But I am not allowed to create any socket on the server side. And also the server has password and username which my program needs to give as an argument. Any idea? Please help.

Many many thanks,
Mahi.
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of access do you have to that folder? If the drive is mounted, all all permissions have been given, you should be able to use the java.io.File classes as you would with a local class. If the file is on a Samba share (probably not, because you specifically mention a Unix share), you could use the jCIFS library.

Sockets are not the answer.
 
reply
    Bookmark Topic Watch Topic
  • New Topic