private static void listAllResources(PrintStream err) throws IOException, URISyntaxException {
    URI uri = Main.class.getResource(JSON_TEMPLATES).toURI();

    final Path templatesPath;
    if (uri.getScheme().equals("jar")) {
      FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap());
      templatesPath = fs.getPath(JSON_TEMPLATES);
    } else {
      templatesPath = Paths.get(uri);
    }

    err.println("Possible templates:");
    PrintFileNames pfn = new PrintFileNames("  ", err);
    Files.walkFileTree(templatesPath, pfn);
  }
Lists all the JSON templates in the Classpath.
benchmark-graphs/src/main/java/org/conscrypt/graphgen/Main.java