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 nga pham <ng...@gmail.com> on 2009/03/18 21:36:52 UTC

Getting started with Lucene

 Hi, I have a project that involve Lucene.
Currently I,
1) downloaded  Lucene-2.4.1. into my CentOS 4.7 box.
2) succesfullly downloaded java, version 6.
3) successfully completed setting CLASSPATH

as I ran the command : java org.apache.lucene.demo.SearchFiles

I get an error saying:
Exception in thread :main: java.lang.NoClassDefFoundError:
org/apache/lucene/demo/SearchFiles
Caused by: java.lang.ClassNotFoundException:
org.apache.lucene.demo.SearchFiles
                  at java.net.URLClassLoader$1.run(Unknown Source)
                  at java.security.AccessController.doPrivileged(Native
Method)
ect.
Could not find the main class. org.apache.lucene.demo.SearchFiles.  Program
will exit.


Thank you,
Nga P.

note: I think I am in your mailing list

Re: Getting started with Lucene

Posted by nitin gopi <ni...@gmail.com>.
hi you should add classpath of both lucene demo jar file and lucene core jar
file .
 then run the command to build the index
final step is to run the command to search files

nitin

On Fri, Mar 20, 2009 at 6:05 PM, Uwe Schindler <uw...@thetaphi.de> wrote:

> As I know, the demos are not compiled by default in the release (because
> they show how you use Lucene and are so included as .java source files in
> the binary distribution). You have to build the demos using ANT.
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: nga pham [mailto:nga.pham@gmail.com]
> > Sent: Wednesday, March 18, 2009 9:37 PM
> > To: java-user@lucene.apache.org
> > Subject: Getting started with Lucene
> >
> >  Hi, I have a project that involve Lucene.
> > Currently I,
> > 1) downloaded  Lucene-2.4.1. into my CentOS 4.7 box.
> > 2) succesfullly downloaded java, version 6.
> > 3) successfully completed setting CLASSPATH
> >
> > as I ran the command : java org.apache.lucene.demo.SearchFiles
> >
> > I get an error saying:
> > Exception in thread :main: java.lang.NoClassDefFoundError:
> > org/apache/lucene/demo/SearchFiles
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.lucene.demo.SearchFiles
> >                   at java.net.URLClassLoader$1.run(Unknown Source)
> >                   at java.security.AccessController.doPrivileged(Native
> > Method)
> > ect.
> > Could not find the main class. org.apache.lucene.demo.SearchFiles.
> > Program
> > will exit.
> >
> >
> > Thank you,
> > Nga P.
> >
> > note: I think I am in your mailing list
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

RE: Getting started with Lucene

Posted by Uwe Schindler <uw...@thetaphi.de>.
As I know, the demos are not compiled by default in the release (because
they show how you use Lucene and are so included as .java source files in
the binary distribution). You have to build the demos using ANT.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: nga pham [mailto:nga.pham@gmail.com]
> Sent: Wednesday, March 18, 2009 9:37 PM
> To: java-user@lucene.apache.org
> Subject: Getting started with Lucene
> 
>  Hi, I have a project that involve Lucene.
> Currently I,
> 1) downloaded  Lucene-2.4.1. into my CentOS 4.7 box.
> 2) succesfullly downloaded java, version 6.
> 3) successfully completed setting CLASSPATH
> 
> as I ran the command : java org.apache.lucene.demo.SearchFiles
> 
> I get an error saying:
> Exception in thread :main: java.lang.NoClassDefFoundError:
> org/apache/lucene/demo/SearchFiles
> Caused by: java.lang.ClassNotFoundException:
> org.apache.lucene.demo.SearchFiles
>                   at java.net.URLClassLoader$1.run(Unknown Source)
>                   at java.security.AccessController.doPrivileged(Native
> Method)
> ect.
> Could not find the main class. org.apache.lucene.demo.SearchFiles.
> Program
> will exit.
> 
> 
> Thank you,
> Nga P.
> 
> note: I think I am in your mailing list


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