Documentation menu

jdx ws

IDE equivalent: Project and library configuration

Manage named workspaces: ordered jar roots reused across queries (create, list, info, remove, use, add). Read commands consume them via -w <name>, JDX_WORKSPACE, or jdx ws use.

Usage#

jdx ws [<options>] <command> [<args>]...

Subcommands#

jdx ws create#

Create a named workspace: an ordered list of binary roots reused via -w <name>. Refuses when the name exists (see ws add, ws remove). Exits 1 when the name exists, 3 on bad usage, 6 on IO failure.

jdx ws create [<options>] <name>
OptionDescription
--jars=<text>Binary roots: jar files, class directories or globs (repeatable, order kept).
--jdkInclude the JDK stdlib (the default).
--no-jdkDo not include the JDK stdlib.
--src=<text>Source dirs: directories of .java/.kt files scanned textually by jdx usages (repeatable, order kept).
--coord=<text>Maven coordinate roots group:artifact:version (repeatable). Stored in the workspace and resolved to jars at query time (local caches first; --fetch on read commands allows Maven repository downloads).
--repo=<text>Maven repository base URLs for --coord fetches (repeatable). Stored in the workspace and tried in order before Maven Central at query time. Must be http(s) URLs.
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
-h, --helpShow this message and exit
ArgumentDescription
<name>Workspace name (letters, digits, '.', '_' and '-').

jdx ws list#

List named workspaces (the default from jdx ws use is marked). Exits 6 on IO failure.

jdx ws list [<options>]
OptionDescription
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
-h, --helpShow this message and exit

jdx ws info#

Show a workspace: ordered roots, JDK switch, whether it is the default. Exits 1 when unknown, 4 when its file is corrupt.

jdx ws info [<options>] <name>
OptionDescription
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
-h, --helpShow this message and exit
ArgumentDescription
<name>Workspace name to show.

jdx ws remove#

Delete a named workspace (clears the jdx ws use default when it pointed here). Exits 1 when unknown, 6 on IO failure.

jdx ws remove [<options>] <name>
OptionDescription
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
-h, --helpShow this message and exit
ArgumentDescription
<name>Workspace name to delete.

jdx ws use#

Set the default workspace read commands use when neither -w nor JDX_WORKSPACE names one (PROPOSAL.md §13). With --clear, unset it. Exits 1 when the workspace is unknown, 3 on bad usage.

jdx ws use [<options>] [<name>]
OptionDescription
--clearUnset the default workspace.
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
-h, --helpShow this message and exit
ArgumentDescription
<name>Workspace name to make the default.

jdx ws add#

Append one binary root (jar, class dir or glob) to a workspace, keeping order. Exits 1 when the workspace is unknown, 3 on bad usage, 4/6 on store failure.

jdx ws add [<options>] <name> <root>
OptionDescription
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
-h, --helpShow this message and exit
ArgumentDescription
<name>Workspace to extend.
<root>Binary root to append (jar, class dir or glob).

Options#

OptionDescription
-h, --helpShow this message and exit

Full help text#

Show jdx ws --help
jdx ws --help
Usage: jdx ws [<options>] <command> [<args>]...

  Manage named workspaces: ordered jar roots reused across queries (create, list, info, remove, use, add). Read commands consume them via -w <name>, JDX_WORKSPACE, or jdx ws use.

Options:
  -h, --help  Show this message and exit

Commands:
  create  Create a named workspace: an ordered list of binary roots reused via -w <name>. Refuses when the name exists (see ws add, ws remove). Exits 1 when the name exists, 3 on bad usage, 6 on IO failure.
  list    List named workspaces (the default from jdx ws use is marked). Exits 6 on IO failure.
  info    Show a workspace: ordered roots, JDK switch, whether it is the default. Exits 1 when unknown, 4 when its file is corrupt.
  remove  Delete a named workspace (clears the jdx ws use default when it pointed here). Exits 1 when unknown, 6 on IO failure.
  use     Set the default workspace read commands use when neither -w nor JDX_WORKSPACE names one (PROPOSAL.md §13). With --clear, unset it. Exits 1 when the workspace is unknown, 3 on bad usage.
  add     Append one binary root (jar, class dir or glob) to a workspace, keeping order. Exits 1 when the workspace is unknown, 3 on bad usage, 4/6 on store failure.

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

Learn more#

Guide: Classpath & workspaces · All commands

View as Markdown · Updated