"Agh for crying out loud, I know that that Java class is in one of these two hundred JARs, just tell me which one!"
Python 3 because that was quickest
import os, sys, zipfile top = sys.argv # e.g. "C:\\Program Files (x86)" classname = sys.argv # e.g. "javax.wsdl.factory.WSDLFactory" member = "/".join(classname.split(".")) + ".class" # e.g. "javax/wsdl/factory/WSDLFactory.class" for dirpath, _, filenames in os.walk(top): for filename in filenames: if not filename.endswith(".jar"): continue filename = os.path.join(dirpath, filename) with zipfile.ZipFile(filename) as jar: if member in jar.namelist(): print(filename)
python findclass.py "C:\\Program Files (x86)" javax.wsdl.factory.WSDLFactory