public static void main(String[] args) throws Exception {
    String xmlFileName = null;
    String htmlFileName = null;

    for (final String arg : args) {
      if (xmlFileName == null) {
        xmlFileName = arg;

      } else if (htmlFileName == null) {
        htmlFileName = arg;

      } else {
        usage("Extraneous command line argument: " + arg);
      }
    }

    if (xmlFileName == null) {
      usage("Missing XML file name");

    } else if (htmlFileName == null) {
      usage("Missing HTML file name");
    }

    File xmlFile = new File(xmlFileName);
    if (!xmlFile.exists()) {
      usage("XML file \"" + xmlFile + "\" does not exist");
    }

    File htmlFile = new File(htmlFileName);
    try (FileInputStream fileInputStream = new FileInputStream(xmlFile);
        FileWriter fileWriter = new FileWriter(htmlFile);
        PrintWriter printWriter = new PrintWriter(fileWriter, true)) {
      convert(fileInputStream, printWriter);
    }
  }
Prints usage information about this program
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/GenerateMBeanHTML.java