Print

Print


(Arg! Classpaths!)

Please tell me why Java throws the NoClassDefFoundError error when I
think I have set up my classpath correctly:

$ pwd
/home/eric/lucene
$ ls -lh
total 720K
-rw-r--r-- 1 eric eric 650K 2008-01-26 08:30 lucene-core-2.3.0.jar
-rw-r--r-- 1 eric eric  52K 2008-01-26 08:30 lucene-demos-2.3.0.jar
$ export CLASSPATH=$PWD:.
$ echo $CLASSPATH
/home/eric/lucene:.
$ java org.apache.lucene.demo.IndexFiles
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
lucene/demo/IndexFiles


Put another way, I have downloaded Lucene and I'm trying to do the
demo application. [1] You are suppose to put the .jar files in your
classpath and then run java org.apache.lucene.demo.IndexFiles. What
am I doing wrong?

[1] http://lucene.apache.org/java/2_3_0/demo.html

--
Eric Lease Morgan