File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mac OS and the fly likes how to navigate network drive on Mac using swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "how to navigate network drive on Mac using swings" Watch "how to navigate network drive on Mac using swings" New topic
Author

how to navigate network drive on Mac using swings

Lucky Dhar
Greenhorn

Joined: Jul 02, 2008
Posts: 7
Hi Everyone,

I tried to navigate network drive with the help of JFileChooser ,JDirectortyDialog,JDirectoryChooser and FileDialog.

But i am not able to navigate to the workstations which are connected to the network.

For e.g.
Network/abc/workstationNumber1

There are so many workstations like workstationNumber1 in the above example which are connected to the network.

My requirement is to navigate through these workstaions,
and there should be a "CreateNewFolder" option on the component(eg-JFileChooser) which we are going to use for the above requirement.

Thanks,
Lucky
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11525
    
100

Can you please provide a little more information? My immediate questions would be:
  • Have you already mounted the network drive on your Mac through the finder?


  • If not ...
  • Are you trying to connect to another Apple operating system (in which case you probably will want to use Apple Filing Protocol (AFP) (your URLs when connecting via the finder would probably look something like afp://server/share))
  • Are you trying to connect to a Microsoft system (in which case you probably want to use the Server Message Blocks/ Common Internet File System (SMB/CIFS) protocol (and your URLs will look something like smb://server/share))
  • Are you trying to connect to a Unix / Linux like system (in which case you probably want to use Network Filing System (NFS) (and your URLs will look something like nfs://server/share))
  • Are you trying to connect using Web Distributed Authoring and Versioning (WebDAV) (in which case your URLs are going to look something like http://server/share)


  • Notes:
  • These are just the common networking protocols. There are others.
  • The very first option (connecting to the share using the finder, then using standard Java) is the easiest option for you as a developer. (There is always a tradeoff between amount of work performed and user experience )
  • The list of protocols / operating systems should only be considered a guideline (at best). They are the protocols that the relevant operating systems would normally use by default if they do not have to worry about interconnectivity. But there is no reason why a system running one of the Microsoft OSes could not be supporting NFS. Likewise a Linux system could be supporting SMB/CIFS and/or AFP.


  • Once you have answers to some of these questions, you could try plugging the name of the network protocol and the word Java into Google and see what sort of libraries you come up with.

    Regards, Andrew


    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: how to navigate network drive on Mac using swings