#!/usr/bin/rubyrequire'find'# extract arguements from command linedirToSearch=ARGV[0]packageName=ARGV[1].to_s.stripputs"dirToSearch=#{dirToSearch};packageName=#{packageName}"results=[]Find.find(dirToSearch).select{|f|f.end_with?".jar"}.each{|f|puts"Checking #{f}"#as jar tf shows the package information like the file path style# we need to map all the dots(.) to slashes(/)contains=`jar tf #{f}`.include?packageName.gsub".","/"ifcontainsresults<<"#{f}"end}puts"The jar files containing #{packageName}"putsresults