There are several tools to manage multiple versions of SDK for Java, Maven, Graddle, SBT, Spark, Spring Boot, etc … depending on the platform. For example, “update-alternatives” is the native tool for Debian-based distributions. However, for developers who usually looks for a multi-platform and multi-SDK tool, SDKMAN is a good choice. For SDK vendors, it got an API platform that allows them to release new versions. As it becomes increasingly popular, I can forsee that many vendors will come on board and it will become a preponderant tool as SDKs repository.
Installation instructions depending on your platform can be found on the official website https://sdkman.io/install. A special note that it can also work on Windows platform through WSL (Windows SubSystem for Linux) layer.
To get the list of SDKs that are actually being managed , you can type sdk list which also provides a detailed description of each of them as per below screenshot.
Let’s try to manage Spark versions.
To list all available versions for spark : sdk list spark
As we can see on above screen, the spark version 3.0.1 is installed is currently active. To install another version, type : sdk install spark 2.4.7
It will trigger the download of the requested version.
To switch between version : sdk use spark 2.4.7
To list down the versions actually being actives for all SDKs:
Enjoy SDKMAN, the easiest way to manage SDKs versions and let’s spare our valuable time to business logics!!