gpt4 book ai didi

java - 在java --version 中无法看到adoptopenjdk-8-hotspot

转载 作者:行者123 更新时间:2023-12-01 18:13:05 30 4
gpt4 key购买 nike

我已经安装了adoptopenjdk

apt search adoptopenjdk | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

adoptopenjdk-8-hotspot/buster,now 8u242-b08-2 amd64 [installed]

但是当我这样做时:-

$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-1deb10u1, mixed mode, sharing)

我在上面的输出中没有看到它。

我错过了什么?

最佳答案

我错了。我必须这样做:

sudo update-alternatives --config java 

并选择adoptopenjdk。然后,我必须这样做:

java -version 

查看新安装的java。

关于java - 在java --version 中无法看到adoptopenjdk-8-hotspot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60427379/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com