code: private static List<String> findFiles(String baseDirName, String targetFileName) {
  
          List<String> classFiles = new ArrayList<>();
          String tempName = null;
          File baseDir = new File(baseDirName);
          if (!baseDir.exists() || !baseDir.isDirectory()) {
  
          } else {
              String[] filelist = baseDir.list();
              for (int i = 0; i < (filelist != null ? filelist.length : 0); i++) {
                  File readfile = new File(baseDirName + File.separator + filelist[i]);
                  if (readfile.isDirectory()) {
                      classFiles.addAll(findFiles(baseDirName + File.separator + filelist[i], targetFileName));
                  } else {
                      tempName = readfile.getName();
                      if (wildcardMatch(targetFileName, tempName)) {
                          String classname;
                          String tem = readfile.getAbsoluteFile().toString().replaceAll("\\\\", "/");
                          classname = tem.substring(tem.indexOf("/classes") + "/classes".length() + 1,
                                  tem.indexOf(".class"));
                          classFiles.add(classname.replaceAll("/", "."));
                      }
                  }
              }
          }
          return classFiles;
      }
docs: search
  
  @param baseDirName
  @param targetFileName