-
Choose Java version here
-
Install the chosen Java version
sdk install java 24.0.2-tem
-
Check Java installation
java --version
Configure a specific Java version for a project
-
Add a
.sdkmanrc
file to the project directory.sdkmanrc java=21.ea.35-open
-
Enable switching SDK versions in SDKMAN! config
~/.sdkman/etc/config sdkman_auto_env=true
-
After setting up the
.sdkmanrc
files, SDKMAN! will automatically switch to the required Java version when youcd
into the project directories.If the specified Java version is not installed, SDKMAN! will prompt you to install it.
Run to install it:
sdk env install