Install Any JDK Version in Seconds with SDKMAN
When developing software in Java, you may need to install various environments and tools: JDKs, Maven, Gradle, JMeter, and more.
Solution
Use SDKMAN!, a software development kit manager. Install it from sdkman.io.
Usage
List available JDKs:
sdk ls java
This displays a list of available JDKs. Each has an identifier. Copy the identifier and install:
sdk install java <identifier>
To switch to a different JDK:
sdk use java <identifier>
Check which JDK or tool is currently in use:
sdk current
See all supported tools:
sdk ls
For more information, visit the SDKMAN! website.