I like JFind very much:
http://jfind.sourceforge.net/
... it works recursively by looking into jar's, inside war's, inside ear's, etc...
If you wrap the java launcher in a shell script and put that on your PATH, it becomes a very powerful tool:
I.e. to find all EntityManager
classes in directory jboss-6.0.0.20100429-M3
:
$ jfind.sh EntityManager ./jboss-6.0.0.20100429-M3
Search String: EntityManager
Windows Search Location: jboss-6.0.0.20100429-M3
....jjj.jjjjjjjjjjj
ClassName = javax/persistence/EntityManager.class
JarName = jboss-6.0.0.20100429-M3\client\hibernate-jpa-2.0-api.jar
----------------
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
ClassName = org/apache/xerces/impl/XMLEntityManager.class
JarName = jboss-6.0.0.20100429-M3\client\xercesImpl.jar
----------------
A little shell wrapper for use in Cygwin:
if [ $# -ne 2 ]
then
echo "Usage: `basename $0` <classname> [<fromDir>]"
exit 1
fi
echo Search String: $1
SEARCH_LOCATION=`cygpath -w $2`
echo Windows Search Location: $SEARCH_LOCATION
java -jar `cygpath -w $HOME/bin/JFind.jar` "$1" "$SEARCH_LOCATION"
echo