On Windows
Make sure to run the script from a dos console with the delayed environment variable expansion option enable, that is cmd /V:ON
The script is to be called with two arguments, the first is the folder where to search in, the second is the class name
echo off FOR /F %%G IN ('DIR /S /B /S %1\*.jar') DO ( echo %%G jar -tf %%G | findstr %2 )
On *nix
find -ls -exec sh -c '/usr/jdk1.5.0_07/bin/jar tf $1 | grep JavaClass.class' {} {} \;
where /usr/jdk1.5.0_07 is the path where the JDK resides and JavaClass.class is the class name to be searched
No comments:
Post a Comment