private static String findJarLike(String dir, String prefix) {
    String[] files = new File(dir).list((dir1, name) -> name.startsWith(prefix) && name.endsWith(".jar"));
    if (files == null || files.length < 1) {
      LOG.warn("No jar file found in directory '{}' with prefix '{}'", dir, prefix);
      return null;
    }

    return files[0];
  }
Register JARs, FILEs and CREATE TEMPORARY FUNCTION for UDF call
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java