My application is built on Java EE.
I have approximately 50 jars in this application.
Is it possible to search for a particular keyword (actually I want to s
Although there are ways of doing it using a decomplier or eclipse , but it gets tricky when those jars are not part of your project , or its particularly painful when using decompiler and you have 100s or 1000s of jars placed in several folders.
I found this CMD command useful , which helps in finding the class names in list of jars present in directory .
forfiles /S /M *.jar /C "cmd /c jar -tvf @file | findstr "classname" && echo @path
You can either navigate to your desired path , and open cmd from there and run this command OR give the path directly in command itself , like this
forfiles /S /M *.jar /C "cmd /c jar -tvf @file | findstr /C:"classname" && echo @path
My use case was to find a particular class in Glassfish , so command will look something like this :