Running Java Program in Sub-Directory

The argument to java is not a file, it is the fully qualified classname of a class inside the classpath (the main class that you want to execute).

It sounds like like class you want is amsPassageretriever.Master (I am assuming you made a typo calling the package amsPassageretrieve at the end of your post).

Hence you should invoke:

java -classpath :/NLP_TOOLS/info_retrieval/lucene/latest/lucene-core-3.1.0.jar:/NLP_TOOLS/info_retrieval/lucene/latest/contrib/demo/lucene-demo-3.1.0.jar:/NLP_TOOLS/info_retrieval/lucene/latest/contrib/wordnet/lucene-wordnet-3.1.0.jar:/NLP_TOOLS/info_retrieval/lemur/latest/share/indri/indri.jar amsPassageretriever.Master

Update: If you want it to run properly when you are not in src then you need to add that directory to your classpath too:

java -classpath /home/user/top-level/src:/NLP_TOOLS/info_retrieval/lucene/latest/lucene-core-3.1.0.jar:/NLP_TOOLS/info_retrieval/lucene/latest/contrib/demo/lucene-demo-3.1.0.jar:/NLP_TOOLS/info_retrieval/lucene/latest/contrib/wordnet/lucene-wordnet-3.1.0.jar:/NLP_TOOLS/info_retrieval/lemur/latest/share/indri/indri.jar amsPassageretriever.Master

try java amsPassageretrieve.Master as amsPassageretrieve is the package as far as i can see

you may also need to add classpath variables if your class requires

You are typing "retrieve" and "retriever" which are two different words