Skip to content

CLI reference

Every Elide command and flag: run, build, test, install, the JVM tools, setup commands, global options, instruments, exit codes and output streams.

On this page

elide --help lists everyday commands; elide --help-all adds the Advanced group and every flag. elide help <command> prints that command’s section of this page.

Run and develop

run

Run a file, a named script, or the project entrypoint. Resolution order: Project setup.

elide run app.ts -- --port 3000
FlagEffect
-s, --snippet CODERun inline code instead of a file.
-l, --language LANGSnippet language: js (default), ts, python, java, or kotlin.
--contexts=<N|auto>Application contexts to prespawn; auto sizes from physical cores. Default 1.

Java and Kotlin snippets are whole programs with a main; arguments after -- reach it:

elide run -l java -s 'void main() { System.out.println("hello from java " + (6 * 7)); }'
elide run -l kotlin -s 'fun main(args: Array<String>) = println(args.joinToString())' -- a b
hello from java 42
a, b

A Java snippet without a class or main fails with Could not find a top-level class/record/enum or a main in the Java snippet.; a Kotlin snippet without main fails with Could not find a `main` function in the Kotlin snippet; declare `fun main() { ... }`.

Debugger, profiler, and coverage flags: Diagnostics flags.

serve (alias start)

Serve a directory as static files, or a script that exports a fetch handler (Development Server).

elide serve ./public
elide serve server.ts -- --verbose
FlagEffect
--host HOSTBind host. Default 127.0.0.1.
--port PORTBind port. Default 8080.
--contexts=<N|auto>Application contexts to prespawn, as for run.
--no-tuiPlain log output instead of the dashboard.
-- SCRIPT_ARGSArguments for the served script.

dev

Like serve, with the same flags, on port 3000. For a directory, HTML pages reload in the browser when files change; a script is not reloaded. --no-watch turns off watching and reload.

install

Install project dependencies.

FlagEffect
--ecosystems LISTEcosystems to install, e.g. maven,npm. Default maven.
--workspaceInstall every ecosystem the project declares.
--with CLASSIFIERAlso download sources, docs, or javadoc.
--slimDownload classes only.
--freshDownload all dependencies, refreshing artifacts in the global cache.
--directCopy artifacts into the project instead of linking them.

repl

Start the interactive REPL. A bare elide in a terminal does the same.

python

Run Python like python; tokens after the script go to the program. Install it with setup first.

elide python script.py --flag-for-the-script
FlagEffect
-c CMDRun a program passed as a string.
-sLeave the user site directory off sys.path.

Interpreter flags (-B, -W, -m, …): Python options.

Build and test

build

Build what elide.pkl declares. Bare tokens name tasks (deps, compile, test, clean; leading : optional). Arguments after -- go to the subprocess.

elide build deps compile
FlagEffect
-i, --inspectList the project’s tasks.
--workers=<N>Run at most N tasks at once.
--no-cacheDisable the build cache for this run.
--offlineDo not fetch remote resources.
-f, --flag NAME[=VALUE]Set a manifest build flag (Build Flags).

test

Run tests, or only those under the given paths. JVM tests come from a test source set: src/test/java or src/test/kotlin by convention, or one declared in elide.pkl (see Source sets).

FlagEffect
-t, --test-name-pattern REGEXRun tests whose name matches.
--where CELJS: run tests for which a CEL expression over name, parents and file is true.
--select SELECTORJVM: run what a selector names: class:, method:, or package:. Repeatable.
--include-tag EXPRJVM: run tests matching any include. Repeatable.
--exclude-tag EXPRJVM: skip tests matching any exclude. Repeatable.
--bail[=N]Stop after N failures. Default 1.
--test-timeout MSPer-test timeout. --timeout limits the whole run.
--onlyRun only tests marked .only.
--concurrency NTests at once (JS files, JVM classes). Default 1.
--reporter NAMEconsole, junit, or tap.
--reporter-outfile DIRReporter output directory.

Debugging tests: Debugging.

format (alias fmt)

Format Java and Kotlin sources. Paths and formatter flags follow --: elide format -- src.

FlagEffect
--list-filesPrint each file that fails the check or is changed.
--list-diffs[=N]Print a diff per file in check mode; with N, only when N or fewer fail.
--installRun elide install first, so --jfmt resolves imports against the project’s dependencies.

--dry-run (after --) checks without writing; it exits 1 if a file would change.

project

CommandPurpose
elide project infoShow resolved project metadata.
elide project adviceShow project advice for coding agents.
elide project exportPrint the project as JSON, a pom.xml, or an IntelliJ model.

publish

elide publish [PROJECT...] [--to <name>] [--skip-existing] [--dry-run] [--sign | --no-sign] [--no-wait]
              [--allow-http-repositories] [--offline]

Builds the project’s JARs and installs them with a POM into the local Maven repository (~/.m2/repository unless publishing.maven.localRepository says otherwise). From a workspace root it publishes every project. From a member it publishes that member and every workspace project its POM depends on, so the coordinates it names are installed too. Every project is built, staged and signed before any is published, so a failure there publishes nothing; a failed upload can still leave the projects uploaded before it in place. Configure it in the manifest’s publishing block.

Naming workspace projects publishes exactly those, for example only the ones that changed since the last release: elide publish core util --to central. A workspace project they depend on but that isn’t named must already be in the target, at the version its manifest declares, or nothing is published. Projects you leave out keep their publishing configuration, so a later run can publish them again.

FlagEffect
--to <name>Publish to the repository of that name in publishing.maven.repositories instead of the local one.
--skip-existingLeave out every project whose version is already in the target, and say which. A snapshot version is always published. Useful to rerun a release that failed halfway.
--dry-runStage (and sign) the POM and JARs under .dev/staging/publish/maven and list them, without publishing. With Maven Central, also writes and lists the bundle, and needs no Portal token, but still signs, so it needs a usable signing key. With named projects or --skip-existing, it still looks versions up in the target, so it lists what a real run would publish; for Central that needs the token.
--sign, --no-signSign the files with gpg, or don’t. Remote publishes sign by default when signing is set.
--no-waitFor Maven Central, return once the deployment is uploaded instead of waiting for validation.
--allow-http-repositoriesAllow a plain http:// repository other than localhost.
--offlineBuild without fetching remote resources.

A version is in the target when its POM is in the local repository, when the remote repository serves its POM, or when the Central Portal reports it published. A Central deployment that was validated but not yet released doesn’t count. A lookup that fails for any other reason, such as refused credentials, stops the run instead of counting as missing.

Project export formats

elide project export --format=<json|pom|intellij> prints to stdout. Default json.

FormatOutput
jsonThe evaluated manifest. Type discriminators use @type and Pkl type names.
pomCoordinates, dependencies by scope, repositories, compiler levels, source and resource roots.
intellijOne module per source set, with content roots, dependencies, SDK level and Kotlin facet.

pom

POM elementValue
<artifactId>The project name.
<groupId>The workspace root’s name, or the project name outside a workspace.
<version>The manifest’s version, or 0.0.0.
<modules>A workspace root’s members.
<parent>A member’s workspace root.
ManifestMaven scope
packages, modulescompile
compileOnly, devPackages, processorsprovided
runtimeOnlyruntime
testPackagestest

Sibling projects become coordinate dependencies and local JARs system-scoped. exclusions and kotlinPlugins are omitted. Extra source roots use build-helper-maven-plugin.

intellij

Modules are named <project>.<sourceSet>. Paths are relative to root, the workspace or project root. Libraries resolve from localRepository (default .dev/dependencies/m2), so run elide install first. The IntelliJ IDEA plugin imports this model.

JVM toolchain

Elide bundles JDK 25 and Kotlin. Elide’s flags go before --; tool arguments follow it.

java

Run JVM programs, like java.

elide java -- -jar app.jar

javac

Compile Java, like javac. See Java Compiler.

FlagEffect
--jar JARPack a JAR at this path after compiling.
--manifest MANIFESTManifest for the --jar output.
--max-errors NShow at most N distinct errors; 0 shows all.
--report-used-deps PATHWrite the classpath entries the compiler read, supertypes included (Bazel strict-deps).
--jdeps PATHWrite a Bazel .jdeps proto with each entry’s kind and the classes used from it, with SHA-256 hashes.
--target-label LABELTarget label recorded in the --jdeps proto.
--unused-inputs PATHWrite classpath entries the compile neither used nor searched (Bazel unused_inputs_list).
--persistent_workerRun as a Bazel persistent worker.
--classpath-cacheReuse classpath state across worker compilations. Worker only.
--capabilitiesPrint compiler capabilities as JSON.
--abi-onlyEmit only an ABI (header) JAR to --emit-abi, --jar or -d.
--emit-abi PATHAlso emit an ABI (header) JAR next to the full compile.
--bindings NAMESelect a named java.bindings group from the project; repeat to combine groups.
--jextract GLOBGenerate and compile Java FFM bindings for matching C headers; repeat for more headers.
--jextract-package NAME / --jextract-class NAMEPackage and header-class name for ad hoc bindings.
--jextract-include-dir DIRHeader include directory for ad hoc bindings; repeatable.
--jextract-define NAME[=VALUE]Preprocessor definition for ad hoc bindings; repeatable.
--jextract-library NAMENative library for ad hoc bindings; repeatable.
--emit-bindings DIRAlso export generated Java sources to this directory for IDEs or other tools.

Header generation runs in memory before javac attribution. The native library is a separate runtime dependency. See C header bindings for named groups, source-set selection, generation-only builds, and a complete example.

kotlinc

Compile Kotlin, like kotlinc. See Kotlin Compiler.

FlagEffect
--incrementalCompile incrementally; state goes in .dev/artifacts/kotlinc/incremental/.
--incremental-cache-dir DIRIncremental state directory.
--plugins LISTBuilt-in plugins: metro, serialization, atomicfu, power-assert.
--metro / --no-metroForce the Metro DI plugin on or off.
--testsEnable test plugins (power-assert).
--abi-onlyEmit only an ABI (header) JAR to -d; --emit-abi PATH after -- adds one to a full compile.
--kapt-sources PATHRun annotation processors over the sources instead of compiling; see Kotlin Compiler.
--ksp-output DIRRun KSP2 symbol processors over the sources instead of compiling (--ksp-sources/--ksp-classes write jars); see Kotlin Compiler.
--max-errors NShow at most N distinct errors; 0 shows all.
--report-used-deps PATHWrite the classpath entries the compiler read, supertypes included (Bazel strict-deps).
--jdeps PATHWrite a Bazel .jdeps proto with each entry’s kind and the classes used from it, with SHA-256 hashes.
--target-label LABELTarget label recorded in the --jdeps proto.
--unused-inputs PATHWrite classpath entries the compile neither used nor searched (Bazel unused_inputs_list).
--persistent_workerRun as a Bazel persistent worker.

jar

Build JARs, like jar. See JAR Assembly.

Native toolchain

cc

Embedded C compiler and linker via LLVM. Compile one freestanding C17 translation unit to a host object or LLVM IR, or compile and link a function in memory with LLVM ORC LLJIT. Backend arguments follow --:

elide cc -- -c answer.c -o answer.o
elide cc -- -S -emit-llvm answer.c -o answer.ll
elide cc -- --run answer answer.c
Backend optionEffect
-cEmit a native object; default output is the input basename with .o in the current directory.
-S -emit-llvmEmit textual LLVM IR; default output has an .ll extension.
-o PATHSelect the output path for object or IR emission.
--run SYMBOLJIT-compile and link, invoke a zero-argument long long function, and print its value.
--help, -hShow backend usage.

Select exactly one output mode. A JIT result is printed to stdout; a successful invocation exits with status zero. The current command exposes object output, IR output, and in-memory linking rather than executable or shared-library output. See Embedded C compiler and linker via LLVM for the complete frontend contract and distribution support.

jextract

Generate Java FFM sources from C headers with the embedded OpenJDK generator. Generator arguments follow --:

elide jextract -- --output generated --target-package example.ffi --header-class-name NativeApi native/api.h

Common generator options are --output, --target-package, --header-class-name, -I, -D, and -l. elide jextract -- --help lists the bundled generator’s options. Compile the generated Java and provide the native library and native-access permission at runtime. For generation and compilation in one invocation, use javac --jextract.

See C header bindings with jextract for a complete shared-library example, symbol selection, library lookup, and FFM memory lifetimes.

Setup and tooling

elide agent commands are for coding agents and other non-interactive callers; see Elide for AI Agents.

CommandFlagsEffect
elide agent help [TOPIC]-l, --lang LANGPrint the agent guide, or a documentation topic, as Markdown.
elide agent diagnostics--jsonPrint the version, platform, crash-report directory and terminal state.
elide agent bug--kind bug|perf|expectation|feature, --jsonPrint an issue URL and report body; --json prints an elide.report/1 skeleton. Submits nothing.
elide agent perf -- COMMAND--runs N (10), --warmup N (3), --baseline COMMAND, --against VERSION, --jsonTime a command locally, optionally against another runtime or an installed Elide version.
elide agent perf --runs 5 --warmup 1 -- elide run hi.mjs
elide run hi.mjs (5 runs, 1 warmup)
  wall 83.4 ms ± 20.1  min 57.7  max 107.0
  cpu  user 15.8 ms  sys 33.1 ms
  rss  max 66.8 MiB
For servers, measure with wrk or oha and paste the results

The command after -- is a full command line, including elide. Report fields and flags in detail: Report a problem.

init

Create a project from a template. With no flags, opens an editor.

Templates: java, ktjvm, web-demo, web-simple, workspace (Kotlin library plus app).

FlagEffect
--templatesList template IDs.
-t, --template TEMPLATESelect a template.
--parametersList template parameters.
--jsonPrint --templates or --parameters as JSON.
-i, --plainAsk plain questions instead of opening the editor.
-d, --skip-defaultsSkip parameters with defaults. Needs --plain.
-s, --skip-runDo not run Elide after generating.
--overwriteReplace existing files.

adopt

Migrate the project in the current directory to Elide with an AI coding harness (Adopt an Existing Project). With no flags, it asks for each choice. Exits 0 when the harness succeeds, 1 when it fails or cannot start, 130 on Ctrl+C.

FlagEffect
--build STRATEGYelide (create an Elide build) or existing (keep Maven/Gradle).
--harness HARNESScodex, claude, or omp.
--approval MODEauto-approve, manual-approve, or yolo (bypasses protections).
--logStream harness output as well as logging it.
--prompt-append FILEAppend guidance to the prompt. Repeatable.
--non-interactiveBatch mode. Needs all three choices; not manual-approve.

help

Read this documentation offline. A command name prints its section, a slug or title prints the page, and options lists every flag.

0:07 / 0:07
FlagEffect
--format FORMATauto (default), interactive, or markdown.
-w, --width WIDTHMaximum width. Default 110.
-l, --lang LANGDisplay language.
--languagesList display languages.
--no-animationHide the snow animation; Tab toggles it.

info

Show binary, platform, language, and network transport details. --cargo-lockfile prints the embedded lockfile.

upgrade

Update Elide.

FlagEffect
--checkReport without applying.
--forceUpdate even when current.
--channel CHANNELrelease or nightly. Default: this build’s channel.

setup

Install an optional component: elide setup python.

FlagEffect
--channel CHANNELrelease or nightly. Default: this build’s channel.
--forceRe-apply an installed component.

setup installs the component for the running version and never upgrades or downgrades Elide. elide upgrade keeps installed components. setup refuses package manager installs (Homebrew, apt, RPM, MSI, nix, snap); use the install script:

curl -sSL --tlsv1.2 elide.sh | bash -s -- --with-python

use

Pin a version in .elideversion and download it: elide use 1.6.0.

FlagEffect
--channel CHANNELrelease or nightly.
--no-installWrite the pin without downloading.

Versions are releases (1.6.0, v1.6.0) or nightly datestamps (20260921). --ignore-version runs this binary anyway.

lsp

Start a Language Server Protocol server over stdio. Serves Java; see Other editors.

mcp

Start a Model Context Protocol server. See Project MCP server.

FlagEffect
--mode MODEstdio (default) or http (legacy HTTP+SSE).
--host HOSTHTTP bind host. Default localhost.
--port PORTHTTP bind port. Default 8125.

Advanced

Listed by elide --help-all.

classpath

Print a resolved classpath for [<sourceSet>:]<usage>, e.g. test:runtime. Usages: toolchain, processor, compile, modules, runtime, provided. Default main:compile; an unknown usage exits 2.

FlagEffect
--offlineDo not fetch remote resources.

index

Index the project’s resolved Maven dependencies and query that index. Actions: build, status (default), get <address>, references <address>, used-by <name>, resolve <name>. An address is maven:group:artifact:version, optionally followed by /symbol and #member; a member is name(paramType,...) for methods and constructors (<init>) and the bare name for fields. build writes the layers named by --layers (default l0,l1; l2 adds member signatures, l3 adds outbound references) beside any already built. get, references and resolve exit 1 for an unknown artifact, symbol, member or name, and 2 when a layer they need has not been built; run elide index build --layers=....

build also compiles main Java and Kotlin sources and refreshes their local reference index. references local:<project>/<type> reads a local class’s outbound references; used-by <type>[#member] prints matching package-relative local source files. Queries do not refresh those compiled references. See Dependency code index for examples and experimental scope.

FlagEffect
--layers=<l0,l1,l2,l3>Layers build writes; l0 is always included.
--offlineDo not fetch remote resources.

javadoc

Generate Javadoc, like javadoc. Arguments follow --.

FlagEffect
--theme THEMEdefault or elide.

javaformat

Format Java with google-java-format, or with the Netflix jfmt dialect given --jfmt. Arguments follow --. Takes format’s --list-files and --list-diffs. See Formatting.

javap

Disassemble JVM bytecode, like javap. Arguments follow --.

jdeps

Analyze JVM class dependencies, like jdeps. Arguments follow --.

ktfmt

Format Kotlin with ktfmt. Arguments follow --. Takes format’s --list-files and --list-diffs.

mvn

Run Maven, like mvn: elide mvn -- package. See Native Maven.

Flag (after --)Effect
--flavor NAMEPlugin set, e.g. spring@4.1.0. Detected from pom.xml by default.
--mode=MODEnative (default), mixed, or legacy.
--yesApprove downloads without prompting.
--porcelainStream Maven’s own output.

native-image

Build a JVM program into a native executable. Arguments follow --. See Native Image.

rewrite

Run OpenRewrite recipes on the project’s main Java sources (experimental in 1.6.0). Recipes come from the bundled libraries and dependencies.maven.devPackages; dependency types come from the code index. elide rewrite --list prints available recipes; elide rewrite <name>… applies them in order. The default workflow compiles main sources and filters candidate files when recipe preconditions support it. See OpenRewrite for setup, examples, and compatibility limits. Exit 1 for an unknown recipe, 2 for a usage error.

FlagEffect
--dry-runPrint diffs without applying source changes; build state can still be written.
--listList available recipes without compiling main sources.
--no-prefilterSkip main-source compilation and parse every main Java source.
--offlineDo not fetch remote resources.

web

Web tooling: elide web build app.ts page.md --out dist builds files without a manifest. See Web Toolchain.

FlagEffect
-o, --out DIROutput directory.

Global options

Accepted before or after the command name, before any --.

Common flags

OptionEffect
-p, --project PATHProject directory.
-f, --flag NAME[=VALUE]Set a manifest build flag.
-q, --quietHide progress. Warnings, errors, and program output still print.
-v, --verbose / --debugMore logging.
--color / --no-colorForce color on or off.
--timeout DURATIONTime limit, e.g. 30s, 5m; 0 disables it. Kills child processes and exits 124.
--max-mem SIZEHeap limit, e.g. 512m, 8g. One-shot runs default to 4g.
--limit NAME=COUNTResource limit: workers or fds. Repeatable.
--interopShare one context across languages (Languages).
-V, --versionPrint the version.

Configuration files

Application commands load .env then .env.local from the invocation directory. --project selects the project directory, including enclosing Elide projects. Existing environment variables win, including empty values. .properties and .properties.local supply Java system properties; explicit VM/engine assignments win. Properties use Java syntax, including escapes and continuations.

OptionEffect
--env-file PATHUse explicit dotenv files instead of automatic discovery; repeat to layer files.
--properties-file PATHUse explicit Java properties files instead of automatic discovery; repeat to layer files.
--no-envDisable dotenv loading.
--no-propertiesDisable properties file loading.

The current standalone Java run path can still read an automatic .properties file despite --no-properties. See the documented isolation limitation.

Explicit paths are relative to the invocation directory; later files win. A file flag and its disable switch cannot be combined. Missing automatic files are silent; malformed or explicitly missing files fail.

Both formats accept dotenvx encrypted: values. Supply private keys through DOTENV_PRIVATE_KEY* or .env.keys beside the selected files. Key files are read only when decryption is needed and are never exported as application variables. The dotenvx CLI’s file authoring format remains dotenv; Java properties files use unquoted ciphertext as property values. Shell substitutions are not executed.

Use ${NAME} for dotenv interpolation. Properties and decrypted payloads are not interpolated. File loading does not grant additional manifest environment access or sandbox capabilities. In JVM mode, file variables reach guest environment APIs and child processes; the already-running JVM’s own System.getenv() remains its launch environment.

Automatic discovery applies to application and project execution commands, not every standalone tool. Explicit file flags also select a context for tool commands. See Environment and properties for the exact command scope, project-directory layering, per-file interpolation, encrypted-value authoring, key lookup order, and examples.

Sandbox flags

Programs run unconfined until you pass a sandbox flag. See Sandbox.

OptionEffect
--sandbox[=PROFILE]Profile: trusted. Bare --sandbox confines filesystem access.
--allow-read[=PATHS]Grant reads; bare grants all.
--allow-write[=PATHS]Grant writes; bare grants all.
--allow-net[=HOSTS]Permit network; bare permits all.
--deny-net=HOSTSDeny hosts; overrides --allow-net.
--allow-run[=CMDS]Permit subprocesses; bare permits all.
--deny-run=CMDSDeny commands; overrides --allow-run.
--allow-env[=NAMES]Variables the manifest may read; bare allows all.
--fs-auditLog each filesystem access decision.
--allow-threadsPermit guest threads. Denied by default.
--allow-native / --no-nativePermit or deny guest native access.

Diagnostics flags

OptionEffect
--debugger[=MODE|ADDRESS]Attach a debugger: auto, cdp, dap, or a JDWP address (5005, host:5005). See Debugging.
--debugger-host HOSTDebugger bind host. Default 127.0.0.1.
--debugger-port PORTDebugger port. Default 4711 (DAP) or 1337 (CDP).
--profiler[=PROFILER]cputracing, cpusampling, or memtracing.
--coverage[=auto]Collect coverage.
--insights INSIGHTSInject Insight scripts.
--error-format FORMATUncaught errors: auto (default), pretty, or plain.
--abort-on-uncaught-exceptionAbort with SIGABRT on an uncaught exception.
--redirect-warnings FILEWrite warnings to FILE instead of stderr.

Version flags

OptionEffect
--use-version VERSIONRun another installed Elide version.
--ignore-versionIgnore .elideversion and --use-version.

Advanced flags

OptionEffect
--transport TRANSPORTNetwork transport (Network transport).
--locale LOCALECLI locale, e.g. fr.
-X, --vm KEY=VALUESet a VM property.
--safe-closeShut down fully even for one-shot runs.
--pkgst / --no-pkgstAccepted; no effect. To skip the maven.pkg.st proxy, see Repositories.
--otel-endpoint=URLSend OpenTelemetry data to this OTLP endpoint.
--otel-provider=PROVIDERSend OpenTelemetry data to a provider: otlp, sentry, datadog, posthog, honeycomb, grafana.
--otel-protocol=PROTOCOLOTLP protocol: grpc, http/protobuf, http/json.
--otel-shutdown=MODEHow the final export leaves at exit: sidecar, inline, drop.
--no-otelTurn OpenTelemetry export off.
--help-instrumentsList instrument flags.

Python options

CPython flags; put them before the script.

OptionEffect
-IIsolated mode.
-BDo not write bytecode files.
-EIgnore PYTHON* environment variables.
-SDo not import site on startup.
-uUnbuffered stdout and stderr.
-PDo not prepend an unsafe path to sys.path.
-OOptimize. Repeatable.
-bWarn on bytes/str comparisons. Repeatable.
-xAccepted; no effect.
-W ARGWarning control. Repeatable.
-m MODULERun a module as __main__.

Network transport

--transport=Effect
autoDefault: v2 on Linux and macOS, nio elsewhere.
v2Elide’s native transport.
epoll, kqueue, io_uringv2 with that driver. Fails on other platforms.
nioPortable transport.

Instruments

OptionEffect
--jfr FILERecord a JFR file, saved on exit.
--jfr-settings SETTINGSdefault, profile (default), or a .jfc file.
--jitdump DIRWrite JIT metadata for Linux perf.
--heap-dump FILEDump the heap on exit.
--heap-dump-on-oom FILEDump the heap on out-of-memory, then exit 3.
--vmstatMake the process visible to jps, jstat, and jcmd.

Exit codes

CodeMeaning
0Success, help, or version output.
1The command or program failed.
2Invalid usage, unknown run target, or a removed command.
3Out of memory; --heap-dump-on-oom wrote a heap dump.
124--timeout expired.
otherSet by the program or tool.

Once a timeout starts terminating the process tree, its 124 status takes precedence over child exit codes produced during cleanup (for example, 137 after SIGKILL).

Output streams

  • Program output, test reports, and machine-readable output go to stdout.
  • Progress and diagnostics go to stderr.
  • Color is off when the stream is not a terminal. --color, FORCE_COLOR, or CLICOLOR_FORCE force it on; --no-color or NO_COLOR turn it off.
  • --quiet hides progress only.

Was this page helpful?