code: public static String getHeaderName(final String basename, final String filename) {
      final String base = basename.replaceAll("\\\\", "/");
      final String file = filename.replaceAll("\\\\", "/");
      if (!file.startsWith(base)) {
        throw new IllegalArgumentException("Error " + file + " does not start with " + base);
      }
      String header = file.substring(base.length() + 1);
      header = header.replaceAll("/", "_");
      header = header.replaceAll("\\.class", ".h");
      return header;
    }
docs: Returns the header file name (javah) corresponding to the given class file
  name
  
  @param filename
  the absolute file name of the class
  @return the header file name.