sdk list
# sdk list <<software>
sdk list java
# sdk install <<software> <<identifier>>
sdk install java 11.0.22-tem
# sdk use <<software> <<identifier>>
sdk use java 11.0.22-tem
Use the version by default
# sdk default <<software> <<identifier>>
sdk default scala 3.3.1
sdk use java 11.0.22-tem
sdk use maven 3.8.4
# adds .sdkmanrc file
sdk env init
sdk env install
Sample .sdkmanrc
file
# Add key=value pairs of SDKs to use below
java=11.0.22-tem
maven=3.8.4
You don't need to run sdk env
every time.
sed -i -E 's/sdkman_auto_env=false/sdkman_auto_env=true/' ~/.sdkman/etc/config
Alternatively, you can open the config file and edit futher.
sdk config