public static void usage(String execCmd) {
		StringBuilder sb = new StringBuilder();
		final String INDENT = "           ";
		
		sb.append("Headless Analyzer Usage: %s\n".formatted(execCmd));
		sb.append(INDENT + "<project_location> <project_name>[/<folder_path>]\n");
		sb.append(INDENT + "  | ghidra://<server>[:<port>]/<repository_name>[/<folder_path>]\n");
		for (Arg arg : Arg.values()) {
			switch (arg) {
				case IMPORT -> {
					// Can't use both IMPORT and PROCESS, so must handle the usage a little
					// differently
					sb.append(
						INDENT + "[[%s] | [%s]]\n".formatted(arg.usage(), Arg.PROCESS.usage()));
				}
				case PROCESS -> {
					// Handled above by IMPORT
				}
				case LOADER_ARGS -> {
					// Loader args are a little different because we don't know the full
					// argument name ahead of time...just what it starts with
					sb.append(INDENT + "[%s<loader argument name> %s]\n"
							.formatted(Arg.LOADER_ARGS.name, Arg.LOADER_ARGS.subArgFormat));
				}
				default -> {
					sb.append(INDENT + "[%s]\n".formatted(arg.usage()));
				}
			}
		}

		if (Platform.CURRENT_PLATFORM.getOperatingSystem() != OperatingSystem.WINDOWS) {
			sb.append("\n");
			sb.append(
				"     - All uses of $GHIDRA_HOME or $USER_HOME in script path must be" +
					" preceded by '\\'\n");
		}
		sb.append("\n");
		sb.append(
			"Please refer to 'analyzeHeadlessREADME.html' for detailed usage examples " +
				"and notes.\n");

		sb.append("\n");
		System.out.println(sb);
		System.exit(EXIT_CODE_ERROR);
	}
Prints out the usage details and exits the Java application with an exit code that
indicates error.

@param execCmd the command used to run the headless analyzer from the calling method.
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/AnalyzeHeadless.java