Last Updated: February 25, 2016
·
1.224K
· phaus

Find a Class in a bunch of JAR Files

  1. Iterate over every jar in your folder.
  2. Output every JAR Name (to match found classes to JARs lateron)
  3. List Content of every JAR ( jar -tvf "$j" )
  4. Grep for that specific ClassName grep -Hsi ClassName

for j in *.jar; do echo $j:; jar -tvf "$j" | grep -Hsi ClassName; done