sdkman安装及使用

sdk管理神器–sdkman安装使用教程

安装

下载并安装

1
2
3
yum install zip -y
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

查看安装是否成功

1
sdk version

安装成功后在home目录下有一个.sdkman文件夹

更新

1
sdk update

卸载

1
2
tar zcvf ~/sdkman-backup_$(date +%F-%kh%M).tar.gz -C ~/ .sdkman
rm -rf ~/.sdkman

查看帮助

1
sdk help

使用

以安装jdk11为例

查找

1
sdk list java

1
sdk ls java

查找结果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
================================================================================
Available Java Versions
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
AdoptOpenJDK | | 14.0.1.j9 | adpt | | 14.0.1.j9-adpt
| | 14.0.1.hs | adpt | | 14.0.1.hs-adpt
| | 13.0.2.j9 | adpt | | 13.0.2.j9-adpt
| | 13.0.2.hs | adpt | | 13.0.2.hs-adpt
| | 12.0.2.j9 | adpt | | 12.0.2.j9-adpt
| | 12.0.2.hs | adpt | | 12.0.2.hs-adpt
| | 11.0.7.j9 | adpt | | 11.0.7.j9-adpt
| >>> | 11.0.7.hs | adpt | installed | 11.0.7.hs-adpt
| | 8.0.252.j9 | adpt | | 8.0.252.j9-adpt
| | 8.0.252.hs | adpt | | 8.0.252.hs-adpt
Amazon | | 11.0.7 | amzn | | 11.0.7-amzn
| | 8.0.252 | amzn | | 8.0.252-amzn
Azul Zulu | | 14.0.1 | zulu | | 14.0.1-zulu
| | 13.0.3 | zulu | | 13.0.3-zulu
| | 13.0.3.fx | zulu | | 13.0.3.fx-zulu
| | 12.0.2 | zulu | | 12.0.2-zulu
| | 11.0.7 | zulu | | 11.0.7-zulu
| | 11.0.7.fx | zulu | | 11.0.7.fx-zulu
| | 10.0.2 | zulu | | 10.0.2-zulu
| | 9.0.7 | zulu | | 9.0.7-zulu
| | 8.0.252 | zulu | | 8.0.252-zulu
| | 8.0.252.fx | zulu | | 8.0.252.fx-zulu
| | 8.0.232.fx | zulu | | 8.0.232.fx-zulu
| | 7.0.262 | zulu | | 7.0.262-zulu
| | 6.0.119 | zulu | | 6.0.119-zulu
BellSoft | | 14.0.1.fx | librca | | 14.0.1.fx-librca
| | 14.0.1 | librca | | 14.0.1-librca
| | 13.0.2.fx | librca | | 13.0.2.fx-librca
| | 13.0.2 | librca | | 13.0.2-librca
| | 12.0.2 | librca | | 12.0.2-librca
| | 11.0.7.fx | librca | | 11.0.7.fx-librca
| | 11.0.7 | librca | | 11.0.7-librca
| | 8.0.252.fx | librca | | 8.0.252.fx-librca
| | 8.0.252 | librca | | 8.0.252-librca
GraalVM | | 20.1.0.r11 | grl | | 20.1.0.r11-grl
| | 20.1.0.r8 | grl | | 20.1.0.r8-grl
| | 20.0.0.r11 | grl | | 20.0.0.r11-grl
| | 20.0.0.r8 | grl | | 20.0.0.r8-grl
| | 19.3.1.r11 | grl | | 19.3.1.r11-grl
| | 19.3.1.r8 | grl | | 19.3.1.r8-grl
Java.net | | 15.ea.23 | open | | 15.ea.23-open
| | 14.0.1 | open | | 14.0.1-open
| | 13.0.2 | open | | 13.0.2-open
| | 12.0.2 | open | | 12.0.2-open
| | 11.0.7 | open | | 11.0.7-open
| | 10.0.2 | open | | 10.0.2-open
| | 9.0.4 | open | | 9.0.4-open
| | 8.0.252 | open | | 8.0.252-open
SAP | | 14.0.1 | sapmchn | | 14.0.1-sapmchn
| | 13.0.2 | sapmchn | | 13.0.2-sapmchn
| | 12.0.2 | sapmchn | | 12.0.2-sapmchn
| | 11.0.7 | sapmchn | | 11.0.7-sapmchn
================================================================================
Use the Identifier for installation:

$ sdk install java 11.0.3.hs-adpt
================================================================================

安装

安装AdoptOpenJDK 11

1
sdk install java 11.0.7.hs-adpt

1
sdk i java 11.0.7.hs-adpt

卸载

1
sdk uninstall java 11.0.7.hs-adpt

1
sdk rm java 11.0.7.hs-adpt
作者

yhan219

发布于

2020-05-22

更新于

2020-05-22

许可协议