我在Ubuntu 18.10上有SDKMAN 5.7.3 + 337,其中列出了这些Java可用版本:
13.ea.17-open > * 10.0.2-open 1.0.0-rc-12-grl
12.0.1-zulu * 9.0.7-zulu 1.0.0-rc-11-grl
12.0.1-librca 9.0.4-open 1.0.0-rc-10-grl
12.0.1-sapmchn 8.0.212-zulu 1.0.0-rc-9-grl
12.0.1-open 8.0.212-amzn 1.0.0-rc-8-grl
+ 12.0.0-open 8.0.212-librca
11.0.3-sapmchn + 8.0.202-zulu
11.0.3-zulu 8.0.202.j9-adpt
11.0.3-amzn 8.0.202.hs-adpt
11.0.3-librca 8.0.202-zulufx
+ 11.0.2-open 7.0.222-zulu
11.0.2.j9-adpt 6.0.119-zulu
11.0.2.hs-adpt 1.0.0-rc-15-grl
11.0.2-zulufx 1.0.0-rc-14-grl
10.0.2-zulu 1.0.0-rc-13-grl
而在Ubuntu 18.04.1 LTS上的相同SDKMAN版本(如Windows 10中的WSL)显示:
13.ea.17-open * 9.0.4-open 1.0.0-rc-11-grl
12.0.1-sapmchn 8.0.212-zulu 1.0.0-rc-10-grl
12.0.1-zulu 8.0.212-amzn 1.0.0-rc-9-grl
12.0.1-open 8.0.212-librca 1.0.0-rc-8-grl
12.0.1-librca + 8.0.202-zulu
11.0.3-sapmchn 8.0.202.j9-adpt
11.0.3-zulu 8.0.202.hs-adpt
11.0.3-amzn 8.0.202-zulufx
11.0.3-librca + 8.0.191-oracle
11.0.2.j9-adpt 7.0.222-zulu
11.0.2.hs-adpt 6.0.119-zulu
11.0.2-zulufx 1.0.0-rc-15-grl
10.0.2-zulu 1.0.0-rc-14-grl
10.0.2-open 1.0.0-rc-13-grl
9.0.7-zulu 1.0.0-rc-12-grl
缺少11.0.2-open
的地方。为什么会发生这种情况,我该如何解决?
PS:我已经运行了sdk selfupdate
和sdk update
答案 0 :(得分:3)
即使没有列出,您仍然可以安装您需要的版本。至少,它对我有用 java 10.0.2-open
,就我而言,它没有出现。试一试并运行命令 sdk install java 11.0.2-open
答案 1 :(得分:0)
似乎正在下载缺少的版本:
wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
然后解压到:
~/.sdkman/candidates/java/
然后重命名提取的目录:
mv ~/.sdkman/candidates/java/jdk-11.0.2 ~/.sdkman/candidates/java/11.0.2-open
解决了问题。
PS:当然,您必须更改~/.sdkman/candidates/java/
以匹配您的SDKMAN安装路径(如果不是默认安装路径)