jdk
List, install, and locate JDKs used by jbx.
When to use it
- Verify which JDK will run Java 25 compact scripts.
- Install a missing Temurin JDK for a CI runner.
- Debug why JAVA_HOME differs from the JDK selected by jbx.
Common workflows
jbx jdk list
jbx jdk home 25
jbx jdk install 25
Real-life examples
Verify the Java 25 runtime for compact scripts
jbx jdk list
jbx jdk home 25
jbx doctor --json
Use jdk when JAVA_HOME, CI image defaults, or compact-source support are in doubt.
Agent loop
- List available JDKs with
jbx jdk list. - Locate the required major version with
jbx jdk home <version>. - Install only when the requested version is missing and installation is acceptable.
- Re-run
jbx doctor --jsonor the original command.
Agent notes
Installing a JDK changes machine state. In shared CI images or developer machines, prefer reporting the missing version unless installation is explicitly part of the task.
Verification checklist
- Required Java version has a concrete home path.
- The selected JDK matches the script's
//JAVAor CLI--javarequirement. - The original compile/test/run command succeeds with that JDK.
Arguments and flags
This section is copied from the CLI help for this release so the page explains the actual accepted arguments.
jbx jdk
Manage installed JDKs
Usage: jbx jdk <COMMAND>
Commands:
list List discovered and installed JDKs
install Install a JDK from Adoptium (Eclipse Temurin)
home Show JDK home directory for a given version
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
jbx jdk list
List discovered and installed JDKs
Usage: jbx jdk list
Options:
-h, --help Print help
jbx jdk install
Install a JDK from Adoptium (Eclipse Temurin)
Usage: jbx jdk install <VERSION>
Arguments:
<VERSION> JDK version to install (e.g. 21, 25, 25+)
Options:
-h, --help Print help
jbx jdk home
Show JDK home directory for a given version
Usage: jbx jdk home [VERSION]
Arguments:
[VERSION] JDK version (defaults to 25) [default: 25]
Options:
-h, --help Print help
Skill
Agents can fetch the matching versioned skill with:
jbx skill get jbx-jdk