Generating dumb make file 

COMPILER=javac
ls *.java | doeach.pl -q $echo "@'@n.class: @_\\n\\t$COMPILER @_\\n@'"
[Note]

The dumb make is so stupid that it does re-compilation every time.

elegant solution 

CLASSFDIR=/java/classes

${CLASSFDIR}/%.class: %.java
        javac -d ${CLASSFDIR} $<

include classfiles.mk

all: ${CLASSFILES}

clean:
        rm *~ */*~ ${CLASSFILES}
[Note]

java is the worst system to utilize make.

cd /java/expresso/webapps/expresso/WEB-INF/classes/com/jcorporate/expresso/services/controller/dbmaint
javac -d . Lookup.java
javac -d ./ Lookup.java
javac -d `pwd` Lookup.java

All above commands actually yield .class file under /java/expresso/webapps/expresso/WEB-INF/classes/com/jcorporate/expresso/services/controller/dbmaint/com/jcorporate/expresso/services/controller/dbmaint

Example 2. File: classfiles.mk

CLASSFILES= ${CLASSFDIR}/AdvReader.class ${CLASSFDIR}/DbHandler.class ${CLASSFDIR}/Token.class ${CLASSFDIR}/knn/DbKnn.class ${CLASSFDIR}/knn/Knn.class ${CLASSFDIR}/knn/MessageClassifier.class ${CLASSFDIR}/knn/NeighborList.class ${CLASSFDIR}/knn/NeighborNode.class ${CLASSFDIR}/knn/inst_tst.class ${CLASSFDIR}/rand.class