title: Lucene using FSDirectory
body: <p>I wrote a simple java program to create a lucene index, but I get an error with the syntax.</p>
  
  <p>My code:</p>
  
  <pre><code>static final String INDEX_DIRECTORY = "/home/yuqing/Desktop/index";
  Directory index = FSDirectory.open(new File(INDEX_DIRECTORY));
  </code></pre>
  
  <p>I get the following error,</p>
  
  <pre><code>open (java.nio.file.path) in FSDirectory cannot be applied to java.io.file
  </code></pre>