Hello,
Sometimes you wish to dive in deep to your own teams' custom code.
I found a nice script that help speed up the "find" process to isolate the exact JAR file where that code may exist.
Of course, after you have now identified the JAR file, you can use a 3rd party tool, such as JDGUI to view the business logic. Java Decompiler
Ref: Searching JARs for String (Linux) | JavaWorld
I modified the script to make it case-insensitive.
*** ***
#!/bin/bash
printf "Searching JARs for string '${1}'...\n"
find . -iname '*.jar' -printf "unzip -c %p | grep -iq '${1}' && echo %p\n" | sh
*** ***
Example:
[root@sandbox01 /]# ./find-in-jar.sh keyparams
Searching JARs for string 'keyparams'...
./opt/CA/jdk/jdk1.7.0_71_x86/jre/lib/rt.jar
./opt/CA/jdk/jdk1.7.0_71_x64/jre/lib/rt.jar
./opt/CA/jdk/jdk1.6.0_45_x86/jre/lib/rt.jar
./opt/CA/jdk/jdk1.6.0_45_x64/jre/lib/rt.jar
./opt/CA/siteminder/install_config_info/install_config_jre/lib/rt.jar
./opt/CA/siteminder/bin/thirdparty/cryptoj.jar
./opt/CA/siteminder/bin/thirdparty/cryptojFIPS.jar
./opt/CA/aas/lib/cryptoj.jar
./opt/CA/aas/lib/cryptojFIPS.jar
./opt/CA/aas/resources/DBPopulator/DBPopulator.jar
./opt/CA/aas/jre/lib/rt.jar
./opt/CA/webagent/install_config_info/install_config_jre/lib/rt.jar
./opt/CA/webagent/java/cryptoj.jar
./opt/CA/jboss/im_01/jboss-eap-6.2/modules/system/layers/base/org/opensaml/main/xmltooling-1.3.4.redhat-1.jar
./opt/CA/media/iso/jboss/wildfly-9.0.1.Final/modules/system/layers/base/org/bouncycastle/main/bcprov-jdk15on-1.52.jar
./opt/CA/media/iso/jboss/wildfly-9.0.1.Final/modules/system/layers/base/org/jboss/resteasy/jose-jwt/main/jose-jwt-3.0.11.Final.jar
./opt/CA/media/iso/jboss/wildfly-9.0.1.Final/modules/system/layers/base/org/opensaml/main/xmltooling-1.4.1.jar
./opt/CA/media/iso/ca/iam_suite/r12-6-5/server/PasswordTool/lib/cryptojFIPS.jar
./opt/CA/media/iso/ca/iam_suite/r12-6-5/server/PasswordTool/lib/idmutils.jar
./opt/CA/media/iso/ca/iam_suite/r12-6-6/server/PasswordTool/lib/cryptojFIPS.jar
./opt/CA/media/iso/ca/iam_suite/r12-6-6/server/PasswordTool/lib/idmutils.jar
Cheers,
A.