If you run into this error while trying to launch the lucene command line demo:
localhost:/usr/local/src/lucene-2.2.0 $ java org.apache.lucene.demo.IndexFiles `pwd`/src
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/demo/IndexFiles
Make sure you actually added the two jar files to your classpath, and not the directory they're in:
export CLASSPATH=$CLASSPATH:/usr/local/src/lucene-2.2.0/lucene-demos-2.2.0.jar:
export CLASSPATH=$CLASSPATH:/usr/local/src/lucene-2.2.0/lucene-core-2.2.0.jar
You can do it in one command, of course, but that would be a long line which would bust my design ;)
