Documentation menu

jdx show

IDE equivalent: Go to declaration

Show the class card for a type: kind, modifiers, supertypes, member counts, provenance and the next command to run. Takes a type reference (e.g. 'com.example.Point', 'Gson', 'java.util.Map$Entry'); member references are a usage error. Reads --jars roots plus the selected workspace (-w, JDX_WORKSPACE, jdx ws use) plus the JDK stdlib unless --no-jdk. With no workspace selected, Gradle/Maven project roots auto-discover from the working directory. Exits 1 when the type is unknown, 2 when a short name is ambiguous, 4 when the workspace cannot be resolved.

Usage#

jdx show [<options>] <ref>

Example#

jdx show com.google.gson.Gson --coord com.google.code.gson:gson:2.14.0
class com.google.gson.Gson
  public final class Gson
  extends java.lang.Object
  members: 2 constructors, 33 methods, 26 fields
warning MULTI_RELEASE_VARIANT: multi-release gson-2.14.0.jar serves version-specific variants for this JDK (21)
source: gson-2.14.0.jar (bytecode)
next: jdx members com.google.gson.Gson --inherited

Real output — this example ran against the current jdx when the page was built.

Options#

OptionDescription
--jars=<text>Binary roots: jar files, class directories or globs (repeatable). Merge in front of the selected workspace's roots.
-w, --workspace=<text>Use a named workspace (see jdx ws). Explicit --jars merge in front of it.
--no-jdkDo not include the running JDK's stdlib (included by default).
--coord=<text>Maven coordinate root group:artifact:version (repeatable). Resolved from ~/.gradle/caches and ~/.m2 first; with --fetch, downloaded from Maven repositories into <cache-dir>/m2 with checksum verification. Merges in front of the workspace.
--repo=<text>Maven repository base URL for --coord fetches (repeatable, e.g. --repo https://repo.example.com/maven2). Tried in flag order before Maven Central, which stays last as the fallback. Must be an http(s) URL.
--fetchAllow downloading --coord artifacts (and their -sources.jar) from Maven repositories (Central by default, --repo to add mirrors). Without it, coordinates resolve from the local caches only.
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
--no-colorDisable ANSI colors even on a TTY (piped output is always plain).
--no-daemonForce in-process execution: do not forward this query to the background daemon even when its socket answers (PROPOSAL.md §14.1).
-h, --helpShow this message and exit

Arguments#

ArgumentDescription
<ref>Type reference to show (full, short or nested form).

Full help text#

Show jdx show --help
jdx show --help
Usage: jdx show [<options>] <ref>

  Show the class card for a type: kind, modifiers, supertypes, member counts, provenance and the next command to run. Takes a type reference (e.g. 'com.example.Point', 'Gson', 'java.util.Map$Entry'); member references are a usage error. Reads --jars roots plus the selected workspace (-w, JDX_WORKSPACE, jdx ws use) plus the JDK stdlib unless --no-jdk. With no workspace selected, Gradle/Maven project roots auto-discover from the working directory. Exits 1 when the type is unknown, 2 when a short name is ambiguous, 4 when the workspace cannot be resolved.

Options:
  --jars=<text>           Binary roots: jar files, class directories or globs (repeatable). Merge in front of the selected workspace's roots.
  -w, --workspace=<text>  Use a named workspace (see jdx ws). Explicit --jars merge in front of it.
  --no-jdk                Do not include the running JDK's stdlib (included by default).
  --coord=<text>          Maven coordinate root group:artifact:version (repeatable). Resolved from ~/.gradle/caches and ~/.m2 first; with --fetch, downloaded from Maven repositories into <cache-dir>/m2 with checksum verification. Merges in front of the workspace.
  --repo=<text>           Maven repository base URL for --coord fetches (repeatable, e.g. --repo https://repo.example.com/maven2). Tried in flag order before Maven Central, which stays last as the fallback. Must be an http(s) URL.
  --fetch                 Allow downloading --coord artifacts (and their -sources.jar) from Maven repositories (Central by default, --repo to add mirrors). Without it, coordinates resolve from the local caches only.
  --json                  Emit machine-readable JSON instead of human-readable text (same information, D-007).
  --no-color              Disable ANSI colors even on a TTY (piped output is always plain).
  --no-daemon             Force in-process execution: do not forward this query to the background daemon even when its socket answers (PROPOSAL.md §14.1).
  -h, --help              Show this message and exit

Arguments:
  <ref>  Type reference to show (full, short or nested form).

Real output — this example ran against the current jdx when the page was built.

Learn more#

Guide: Reading code · All commands

View as Markdown · Updated