Pridemore, Russell (MAN-Corporate) wrote:
To find a class in a jar, try "unzip -l whatever.jar | grep AdminClient".
In this case, it resides in axis.jar, as expected.

Trivial note 1: I do that kind of search a lot and the unzip is not really needed, because filenames in a jar are not compressed, so you can say fgrep -l AdminClient $CATALINA_HOME/common/lib/*.jar (if you collect your jars there) and get the filenames...

Trivial note 2: there is also an AdminClient.class within jmx-remote-tools.jar,
and even an AdminClientTask.class within axis-ant.jar which matches AdminClient,
and I must admit that in order to be sure which you want, you then have to say

  jar -tf $CATALINA_HOME/common/lib/axis.jar | fgrep AdminClient
org/apache/axis/client/AdminClient.class
  jar -tf $CATALINA_HOME/common/lib/jmx-remote-tools.jar | fgrep AdminClient
com/sun/jmx/remote/opt/security/AdminClient.class

so it might be worth having a script to say something like

for f in `fgrep -l AdminClient $CATALINA_HOME/common/lib/*.jar`; do ls $f; jar -tf $f | fgrep AdminClient; done

which for me produces
../../common/lib/axis-ant.jar
org/apache/axis/tools/ant/axis/AdminClientTask.class
../../common/lib/axis.jar
org/apache/axis/client/AdminClient.class
../../common/lib/jmx-remote-tools.jar
com/sun/jmx/remote/opt/security/AdminClient.class

Tom is-it-obvious-I'm-procrastinating-from-work? Myers



Reply via email to