Sdkman is a useful tool for Java developer which I use for quite a long time. Here I list something I just know about it.
By default you can use the “sdk install java
# 1. Download the JDK pacakge file and extract to a directory, such as "sdk-special-version".
# 1. Show the current version numbers of all the working software managed by Sdkman:
In some cases you want to set different software versions for different projects, such as JDK 8 for project A and JDK 11 for project B. It’s doable that using Sdkman command to do the switch every time, but it’s not efficient. For such scenario, “.sdkmanrc” can be used. Get into your project directory and run the following command, which will create a “.sdkmanrc” file in the directory:
sdk env init
You can open the file, and set the software versions in it, such as:
# Enable auto-env through the sdkman_auto_env config
So every time you get in this directory, the software versions will be set as the ones in the “.sdkmanrc” file.