SDKMAN

Installation

curl -s "https://get.sdkman.io" | bash

After installation, relogon or open a new terminal or source the following scrips.

source "$HOME/.sdkman/bin/sdkman-init.sh"

  • Check Version
sdk version
  • Update candidates available candidate versions
sdk update
  • Update self
sdk selfupdate

Commands

  • Install the latest stable version of JDK
sdk install java
  • Remove JDK version (ex. 17.0.9-oracle)
sdk uninstall java 17.0.9-oracle
  • List all java versions
sdk list java
  • List installed versions
sdk list java | grep installed
  • Show current java
sdk current java
  • Change default java version (ex. 17.0.9-oracle)
sdk default java 17.0.9-oracle
  • List Candidates
sdk list
  • Upgrade candidate versions (ex. java)
sdk upgrade java 
  • Update all versions
sdk upgrade
Written on October 20, 2023