📂Tool
🔖Java
2023-10-29 16:57阅读: 7评论: 0推荐: 0

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)

本文作者:ivanohohoh

本文链接:https://www.cnblogs.com/ivanohohoh/p/17796053.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   ivanohohoh  阅读(7)  评论(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 */
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起