Find in What Jar a Class Is
Oh my. Somebody’s been exceedingly verbose… Here’s another attempt:
20.04.13
— Sébastien Le CallonnecOh my. Somebody’s been exceedingly verbose… Here’s another attempt:
your_ip_is_blacklisted_by sbl.spamhaus.org
← Java Annotations with JRuby: A Spring MVC Example Call Rake from Maven →
powered by txp · © All Rights Reserved, 2003, 2012, 2015, Weblogism.com
licensed under a Creative Commons License.
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]” doneTo 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 : http://www.jamesmurty.com/2008/02/19/find-class-in-jar/
— Pierre Rust · 2013-04-22 22:06 · #