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 } [[commands.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/java.ts" license = "MIT" [[commands.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"] [[commands.field]] id = "mainclass" label = "Main class" description = "Class to launch when not using a JAR." type = "string" position = 0 sources = ["src"] [[commands.field]] id = "classpath" label = "Class path" description = "Directories and zip/jar files to search." type = "string" option = ["-cp"] sources = ["src"] [[commands.field]] 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"] [[commands.field]] 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"] [[commands.field]] id = "version" label = "Print version" description = "Print product version and exit." type = "boolean" option = ["--version", "-version"] sources = ["src"] [[commands.task]] id = "run_jar" label = "Run a JAR" fields = ["jar"] required = ["jar"] [[commands.task]] id = "run_class" label = "Run a class" fields = ["classpath", "mainclass"] required = ["mainclass"] [[commands.group]] id = "basic" label = "Basic" fields = ["jar", "mainclass", "classpath", "showversion", "dry_run", "version"]