Find in What Jar a Class Is

Oh my. Somebody’s been exceedingly verbose… Here’s another attempt:



  1. Nice indeed.

    Being more of a stone men, I tend to use shell for that :

    #!/bin/sh if [ -z “$2” ] then echo Usage: $0 Directory ClassName exit 1 fi for f in $(find $1 -name ‘*.jar’) do jar tf $f | grep “$2” && echo “[in $f]” done

    To be completely honest, I never remember it correctly (damn jar options) and I copy it every time for my snippets … And it’s been stolen from here :

    Pierre Rust · 2013-04-22 22:06 · #