This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes File I/O to a shared network drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "File I/O to a shared network drive" Watch "File I/O to a shared network drive" New topic
Author

File I/O to a shared network drive

Donald Winston
Greenhorn

Joined: Jul 16, 2010
Posts: 16
I need to write and read to a file server from a distributed servlet. (I happen to be using macs for both the app servers and the file server).
Can I use the File class?
If so do I use a URI or a conventional absolute pathname to specify the file?
What would be the pathname or uri be if the shared directory I'm reading and writing to is /data, the server name is blue, and the ip address is 10.1.1.2? Do file servers use a port number? If so then assume it's 9999.

How much slower will this be then using a local drive? (I don't think this is feasible with a distributed app)
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
If you want to use File then you can add NFS to your servers. BTW, if you Google it, NFS is Network File System - not Need For Speed.
Donald Winston
Greenhorn

Joined: Jul 16, 2010
Posts: 16
On a mac I should be able to just turn file sharing on. I used to use shared network drives on Windows without doing anything geeky. I should be able to do the same thing on a mac.

My question is about the pathname or uri that would be used and wether or not I can use the File class which is designed for local drives.

Simpler is better.
 
 
subject: File I/O to a shared network drive
 
Similar Threads
Storing Files larger than 1 GB in MySQL
Shared Drive access from WebSphere
needs clarification regarding statement s like import com.sun.mail.util
Question for the experts!
Java .IO