title: Cannot resolve package org.apache.commons.vfs exception
body: <p>I am getting an exception in my code saying <code>org.apache.commons.vfs.* cannot be resolved</code>. Could someone please explain why this is occurring, and how it can be fixed.</p>
  
  <p>This is my code...</p>
  
  <pre><code>import org.apache.commons.vfs.FileChangeEvent;
  import org.apache.commons.vfs.FileListener;
  import org.apache.commons.vfs.FileObject;
  import org.apache.commons.vfs.FileSystemException;
  import org.apache.commons.vfs.FileSystemManager;
  import org.apache.commons.vfs.VFS;
  import org.apache.commons.vfs.impl.DefaultFileMonitor;
  import com.sample.*;
  
  public class watchDirectory  implements FileListener{
      public static void watchDir(String a){
          FileSystemManager fsManager = VFS.getManager();
          FileObject listendir = fsManager.resolveFile("/home/username/monitored/");
  
          DefaultFileMonitor fm = new DefaultFileMonitor(new CustomFileListener());
          fm.setRecursive(true);
          fm.addFile(listendir);
          fm.start();
      }
  </code></pre>