If it works, use it. You can use IDEA's Find in Path feature to find strings in.class files, or you can use the grep command line tool to search for strings in.class files.
Specific operation
To use the IDEA Find in Path function, you need to open IDEA and select Edit -> on the toolbar; Find -> Find in Path, then select the file type and related options to search for. Using the grep command line tool, you can enter the command, for example, grep -r pattern filename.class, to search for lines in the specified file(filename.class) that contain a specific string(pattern).