Skip to content

Sdkman jdks

Index

sdkman_jdks::get_jdk_major_version

Extract the major version number from a JDK version string or artifact ID. Output: stdout — major version number (e.g. "21")

Arguments

  • $1 (version): string or artifact ID (e.g. "21.0.3-tem" or "21")

sdkman_jdks::install_jdk

Install a specific JDK artifact via SDKMAN.

Arguments

  • $1 (jdk): artifact ID (e.g. "21.0.3-tem")

sdkman_jdks::uninstall_jdk

Uninstall a specific JDK artifact via SDKMAN.

Arguments

  • $1 (jdk): artifact ID (e.g. "21.0.3-tem")

sdkman_jdks::set_default_jdk_by_id

Set the given JDK artifact as the SDKMAN default for java.

Arguments

  • $1 (artifact): ID (e.g. "21.0.3-tem")

sdkman_jdks::get_formatted_all_tem_jdks

Print all available Temurin JDKs in semicolon-delimited format. Output: stdout — lines with fields: major;version;artifact-id;installed('y'/'n') shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::filter_for_installed

Filter formatted JDK lines (from stdin) to only those marked as installed. Output: stdout — matching lines in semicolon-delimited format shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::filter_for_major_version

Filter formatted JDK lines (from stdin) to only those matching the given major version. Output: stdout — matching lines in semicolon-delimited format

Arguments

  • $1 (major): version number

sdkman_jdks::filter_for_latest_per_major_version

Filter formatted JDK lines (from stdin) to retain only the first (latest) entry per major version. Output: stdout — one line per major version in semicolon-delimited format shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_tem_jdk_major_version_field

Extract the major version field (column 1) from semicolon-delimited JDK lines on stdin. Output: stdout — major version numbers, one per line shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_tem_jdk_version_field

Extract the full version field (column 2) from semicolon-delimited JDK lines on stdin. Output: stdout — version strings, one per line shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_tem_jdk_artifact_id_field

Extract the artifact ID field (column 3) from semicolon-delimited JDK lines on stdin. Output: stdout — artifact IDs, one per line shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_latest_available_tem_jdk_major_versions

Print the latest available Temurin JDK entry per major version in semicolon-delimited format. Output: stdout — one line per major version: major;version;artifact-id;installed('y'/'n') shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_latest_available_tem_jdk_for_major_version

Print the latest available Temurin JDK entry for the given major version in semicolon-delimited format. Output: stdout — one line: major;version;artifact-id;installed('y'/'n')

Arguments

  • $1 (major): java version

sdkman_jdks::get_available_tem_jdk_major_versions

Print all available Temurin JDK major version numbers, sorted numerically. Output: stdout — major version numbers, one per line shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_latest_available_tem_jdk_major_version

Print the highest available Temurin JDK major version number. Output: stdout — major version number (e.g. "21") shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::check_available_tem_jdk_major_version

Die if the given major version is not available in the SDKMAN Temurin JDK list.

Arguments

  • $1 (major): java version

sdkman_jdks::get_formatted_installed_tem_jdks

Print all installed Temurin JDK entries in semicolon-delimited format. Output: stdout — lines with fields: major;version;artifact-id;installed('y'/'n') shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_installed_tem_jdks_for_major_version

Print installed Temurin JDK entries for the given major version in semicolon-delimited format. Output: stdout — lines with fields: major;version;artifact-id;installed('y'/'n')

Arguments

  • $1 (major): version

sdkman_jdks::get_formatted_latest_installed_tem_jdk_major_versions

Print the latest installed Temurin JDK entry per major version in semicolon-delimited format. Output: stdout — one line per major version: major;version;artifact-id;installed('y'/'n') shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_formatted_latest_installed_tem_jdk_for_major_version

Print the latest installed Temurin JDK entry for the given major version in semicolon-delimited format. Output: stdout — one line: major;version;artifact-id;installed('y'/'n')

Arguments

  • $1 (major): java version

sdkman_jdks::get_installed_tem_jdk_major_versions

Print all installed Temurin JDK major version numbers, sorted numerically. Output: stdout — major version numbers, one per line shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::get_latest_installed_tem_jdk_major_version

Print the highest installed Temurin JDK major version number. Output: stdout — major version number (e.g. "21") shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::check_installed_tem_jdk_major_version

Die if the given major version has no installed Temurin JDK.

Arguments

  • $1 (major): java version

sdkman_jdks::is_tem_jdk_artifact_installed

Return true if a Temurin JDK with the given artifact ID is currently installed.

Arguments

  • $1 (artifact): ID (e.g. "21.0.3-tem")

Exit codes

  • 0: if true
  • 1: if false

sdkman_jdks::get_latest_installed_tem_jdk_artifact_id_for_major_version

Print the artifact ID of the latest installed Temurin JDK for the given major version. Output: stdout — artifact ID (e.g. "21.0.3-tem")

Arguments

  • $1 (major): java version

sdkman_jdks::install_latest_tem_jdk

Install the latest available Temurin JDK for the given major version.

Arguments

  • $1 (major): version

sdkman_jdks::install_latest_tem_jdks

Install the latest available Temurin JDK for every available major version. shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::set_default_sdk_to_latest_installed_for_major_version

Set the SDKMAN default java to the latest installed Temurin JDK for the given major version.

Arguments

  • $1 (major): java version

sdkman_jdks::set_default_jdk_to_latest_installed

Set the SDKMAN default java to the latest installed Temurin JDK across all major versions. shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

sdkman_jdks::prune_tem_jdks_for_major_version

Uninstall all installed Temurin JDKs for the given major version except the latest available.

Arguments

  • $1 (major): java version

sdkman_jdks::prune_tem_jdks

Uninstall all outdated installed Temurin JDKs across every installed major version. shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.