theriom.com
This blog is mainly for me, a way of remembering things I've done; when I couldn't find an answer on Google, I wrote about it here. Hopefully, other people may find it helpful too.
Finding classes and methods in jar

Recursively list every class in every jar:

find . -name *.jar -exec unzip -l {} ;

Recursively list every method in every jar:

for jar in `find . -name *.jar`; do for class in `unzip -Z1 $jar | grep .class$`; do class=${class//\//.}; javap -classpath $jar ${class//.class/}; done; done;

Recursively list every method in every jar and save it to a file:

for jar in `find . -name *.jar`; do for class in `unzip -Z1 $jar | grep .class$`; do class=${class//\//.}; javap -classpath $jar ${class//.class/} >> ~/Desktop/methods.txt; done; done;

Last modified on 2016-02-15