Search code examples
javafilesystemsfilesystemwatcher

Consuming data from windows share through java code in linux


This is little vague in nature but that is because I have to start working on this.

We are planning to use Windows Share Drive. We will be automatically picking these files from windows share (from java code running at Linux) and using them for further processing.

  1. Is there any known issue in using windows share from java code from Linux? How do we do this? Is mounting the file system only way?
  2. Can we run various file system commands to list files (or move/lock/delete a file etc.)?

Thanks in advance.


Solution

  • Have a look at the Aapche commons-vfs. It has support for SMB (Windows Shares). http://commons.apache.org/vfs/

    Specifically - http://commons.apache.org/vfs/filesystems.html#CIFS