I want to build a search engine using the lucene library. i have not used it
before but i am currently studying the book "Lucene in action". i have a
file Indexer.java which is supposed to take two command line arguments one
specfying the directory containing the files to be indexed and another
containing to store the index. I want to run the class file from the command
line using this command
java -classpath lucene-core-3.2.0.jar:. Indexer bibletext index
but it says the following
Exception in thread "main" java.lang.NoClassDefFoundError: Indexer (wrong
name: indexer/Indexer)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Indexer. Program will exit.
How can I index a directory containing HTML, PDF, and text files from the
command line so i could run my searches on it. thanks for your anticipated
help.
Raphael812
--
View this message in context:
http://lucene.472066.n3.nabble.com/Highlighting-matching-words-within-a-document-tp3079505p3084103.html
Sent from the Lucene - General mailing list archive at Nabble.com.