Sdkman

sdkman

Better software version management and software environment management than update-alternatives.

update-alternatives can only be used for version control, and sdkman can automatically set the JAVA_HOME environment variable.

Its principle is very simple, it will save all managed software under ~/.sdkman/candidates, and change the PATH variable very roughly to achieve the purpose

#$ sdk current
Using:
java: 14.0.2-zulu
gradle: 6.2.2
 Imagine dealing with multiple version of java

# Installing sdkman
$ curl -s "https://get.sdkman.io" | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"

# List All SDK Candidates
# The list command shows all the available candidates, 
# identified by a unique name, the description, the official website, 
# and the installation command
$ sdk list
$ sdk list java

# Install and Manage Java Version
$ sdk install java Identifier                          # online
$ sdk install java _custome_identifier _path_to_target # localy

# Switching Between Versions
$ sdk use java Identifier         # temporarily
$ sdk default java 14.0.1.j9-adpt # permanently

# Remove a Version
$ sdk uninstall java 14.0.1.j9-adpt

# Display the Version in Use
$ sdk current java
$ sdk current

[ref1](Guide to SDKMAN! | Baeldung)

posted @ 2023-10-29 16:57  ivanohohoh  阅读(31)  评论(0)    收藏  举报
/* https://unpkg.com/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json https://unpkg.com/live2d-widget-model-tsumiki@1.0.5/assets/tsumiki.model.json https://unpkg.com/live2d-widget-model-z16@1.0.5/assets/z16.model.json */