JBANG JDK

NAME

jbang jdk — Manage Java Development Kits installed by jbang.

SYNOPSIS

jbang jdk [OPTIONS] [COMMAND]

Installs and manages the JDKs jbang uses. JDKs are normally fetched on demand when a script needs one; use these commands to pre-install versions, pick the default, or point other tools at a jbang-managed JDK.

Examples:

jbang jdk install 21
jbang jdk list
jbang jdk default 21
jbang jdk home 21

OPTIONS

-h, --help

Display this help and exit

--config=<config>

Path to config file to be used instead of the default

--insecure

Enable insecure trust of all SSL certificates.

--[no-]verbose

jbang will be verbose on what it does.

--[no-]quiet

jbang will be quiet, only print when error occurs.

-o, --[no-]offline

Work offline. Fail-fast if dependencies are missing.

--[no-]fresh

Make sure we use fresh (i.e. non-cached) resources.

-x, --[no-]stacktrace

Print exceptions stacktraces to stderr (even when quiet).

--netrc=<netrc>

Path to a .netrc file for HTTP authentication credentials.

--no-netrc

Disable .netrc authentication lookup.

COMMANDS

  • install - Installs a JDK.

  • list - Lists installed JDKs.

  • uninstall - Uninstalls an existing JDK.

  • home - Prints the folder where the given JDK is installed.

  • java-env - Prints out the environment variables needed to use the given JDK.

  • exec - Executes the given command using the default (or specified) JDK.

  • default - Sets the default JDK to be used by JBang.