{
  "id": "java",
  "name": "Java",
  "description": "The Java application launcher.",
  "homepage": "https://openjdk.org",
  "executables": [
    "java"
  ],
  "commands": {
    "format": 1,
    "label": "Launch a Java program",
    "description": "Run a main class or a JAR file. System properties (-D), JVM tuning flags and program arguments are left out; the long --classpath spelling is not used.",
    "quality": "ai-draft",
    "base": "fig:java",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "src",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/java.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "jar",
        "label": "JAR file",
        "description": "Launch the main class of this JAR file.",
        "type": "path",
        "option": [
          "-jar"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "src"
        ]
      },
      {
        "id": "mainclass",
        "label": "Main class",
        "description": "Class to launch when not using a JAR.",
        "type": "string",
        "position": 0,
        "sources": [
          "src"
        ]
      },
      {
        "id": "classpath",
        "label": "Class path",
        "description": "Directories and zip/jar files to search.",
        "type": "string",
        "option": [
          "-cp"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "showversion",
        "label": "Show version and continue",
        "description": "Print product version to the output stream and continue.",
        "type": "boolean",
        "option": [
          "-showversion",
          "--show-version"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "description": "Create the VM and load the main class but do not run main.",
        "type": "boolean",
        "option": [
          "--dry-run"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "version",
        "label": "Print version",
        "description": "Print product version and exit.",
        "type": "boolean",
        "option": [
          "--version",
          "-version"
        ],
        "sources": [
          "src"
        ]
      }
    ],
    "task": [
      {
        "id": "run_jar",
        "label": "Run a JAR",
        "fields": [
          "jar"
        ],
        "required": [
          "jar"
        ]
      },
      {
        "id": "run_class",
        "label": "Run a class",
        "fields": [
          "classpath",
          "mainclass"
        ],
        "required": [
          "mainclass"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "jar",
          "mainclass",
          "classpath",
          "showversion",
          "dry_run",
          "version"
        ]
      }
    ]
  }
}
