SDKMAN
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates.
Installation
To install:
curl -s "https://get.sdkman.io" | bash
and follow the instruction to load SDKMAN! automatically.
Usage
To list all available versions of Java:
sdk list java
To install specific versions:
sdk install java 9.0.7-zulu
sdk install java 17.0.3-zulu
To see what is currently in use:
sdk current java