Open Git Bash and run the following command to install and initialize SDKMAN:
curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" |
If you want to install SDKMAN in a custom location (e.g., /usr/local/sdkman
), use below command instead:
export SDKMAN_DIR="/usr/local/sdkman" && curl -s "https://get.sdkman.io" | bash source "/usr/local/sdkman/bin/sdkman-init.sh" |
Verify the installation by running below command
sdk version |
If you encounter an error about a missing zip utility, ensure it is installed on your system before proceeding.
To list available JDKs:
sdk list java |
To install a specific version of java
sdk install java <version> |
To view installed versions of java
sdk list java |
To check current active version of java
sdk current java |
To use a specific version of java
sdk use java <version> |