2

I have downloaded Lucene 3.0.0 and when I used the command java -jar lucene-core-3.0.0.jar in the directory where Lucene is present

I got this message

Failed to load Main-Class manifest attribute from lucene-core-3.0.0.jar

How do I proceed?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
kshama
  • 1,637
  • 4
  • 18
  • 21
  • 2
    Lucene is a Java library to be used internally within applications, not an executable JAR. What were you expecting it to do? – skaffman Feb 05 '10 at 12:41

3 Answers3

1

Skaffman is correct. Here's a minimal Lucene application. If you want a self-contained search server, try Solr.

Yuval F
  • 20,565
  • 5
  • 44
  • 69
1

I am using lucene for information retrieval. you need to set the classpath after downloading lucene:

Setting up the environment in Linux

setenv LUCENEDIR /opt/lucene-2.4.1
setenv CLASSPATH .:./lucene-core-2.4.1.jar:
./lucene-demos-2.4.1.jar:./lukemin-0.9.2.jar:
$LUCENEDIR/lucene-core-2.4.1.jar:$LUCENEDIR/lucene-demos-2.4.1.jar:
$LUCENEDIR/lukemin-0.9.2.jar:$CLASSPATH
prayagupa
  • 30,204
  • 14
  • 155
  • 192
codious
  • 3,377
  • 6
  • 25
  • 46
0

That error means that is not an executable jar. Perhaps you should put all the jars in your classpath, then start with the demo at http://lucene.apache.org/java/3_0_0/demo.html .

Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539