How to find java class in set of jar files

-bash-4.1$ find path/to/libs -name ‘*.jar’ -exec grep -Hls ClassName {} \;

-bash-4.1$ find /opt/tomcat/webapps/myapp/WEB-INF/lib/ -name ‘*.jar’ -exec grep -Hls MyClass {} \;
/opt/tomcat/webapps/myapp/WEB-INF/lib/my-app-0.1-SNAPSHOT.jar

Advertisements