Tuesday, July 6, 2010

find the jar that contains a class

One way is to do this:

/usr/bin/find / -name \*.jar -print0 | xargs -0 grep -l name-of-class-you-are-looking-for


Another way is to dump all the output to a file and look for the class name:

/usr/bin/find / -name "*.jar" | xargs -n 1 jar tf > temp.txt

No comments:

Post a Comment