You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Mag Gam <ma...@gmail.com> on 2006/08/23 00:23:14 UTC

correct classpath

Hi All,
I am getting into Java + Lucene. To compile a Lucene program

CreateIndex.java

public class CreateIndex {
  // usage: CreateIndex index-directory
  public static void main(String[] args) throws Exception {
    String indexPath = args[0];
    IndexWriter writer;

    // An index is created by opening an IndexWriter with the
    // create argument set to true.
    writer = new IndexWriter(indexPath, null, true);
    writer.close();
  }
}

What CLASSPATH should I set? I currently have this:

/home/tomcat/lucene-2.0.0/lucene-core-2.0.0.jar

thanks!


**

*
*

Re: correct classpath

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Aug 22, 2006, at 6:23 PM, Mag Gam wrote:

> Hi All,
> I am getting into Java + Lucene. To compile a Lucene program
>
> CreateIndex.java
>
> public class CreateIndex {
>  // usage: CreateIndex index-directory
>  public static void main(String[] args) throws Exception {
>    String indexPath = args[0];
>    IndexWriter writer;
>
>    // An index is created by opening an IndexWriter with the
>    // create argument set to true.
>    writer = new IndexWriter(indexPath, null, true);
>    writer.close();
>  }
> }
>
> What CLASSPATH should I set? I currently have this:
>
> /home/tomcat/lucene-2.0.0/lucene-core-2.0.0.jar

Is compilation working for you?   If so, then you've got the  
classpath correct :)   If not, what errors are you seeing?

	Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org