-
Notifications
You must be signed in to change notification settings - Fork 2
POP OS java (step 2)
ng-druid edited this page Sep 22, 2024
·
1 revision
Install SDKMAN!: Open your terminal and run the following command to install
SDKMAN! :
curl -s "https://get.sdkman.io" | bashLoad SDKMAN!: After installation, you need to load SDKMAN! into your current shell session:
source "$HOME/.sdkman/bin/sdkman-init.sh"Install Multiple Versions of Java: You can list all available Java versions with:
sdk list javaTo install a specific version of Java, use:
sdk install java <identifier>For example, to install OpenJDK 11, you might use:
sdk install java 11.0.11-openSwitch Between Java Versions: To switch to a different installed version of Java, use:
sdk use java <identifier>To set a default version globally, use:
sdk default java <identifier>Check the Currently Active Java Version: To see which version of Java is currently active, you can run:
java -version