从 WSL 完全卸载 opendjk-11



我是Python程序员,但想在项目中使用Java/Scala(所以学习Java/Scala(。

在我的Windows子系统Linux(WSL(中,我以前安装了OpenJDK v 11。我想用较低版本或Java 8替换OpenJdk 11.0.07,因为我运行的一个程序需要Java 8。

当我查看 Windows 的控制面板时,我没有看到 java(我的意思是我手动从控制面板中删除(,显然,命令提示符说没有安装 Java。但是当我在 WSL 中发出命令时:

java --version

我得到以下结果:

openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)

如何删除上述内容并在 ubuntu (WSL( 和 Windows 中安装 openjdk 8。

我玩过的命令之一是:sudo apt-get remove openjdk*

sudo apt-get remove openjdk*

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'openjdk-9-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre' for glob 'openjdk*'
Note, selecting 'openjdk-6-jre' for glob 'openjdk*'
Note, selecting 'openjdk-6-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-11-demo' for glob 'openjdk*'
Note, selecting 'openjdk-8-demo' for glob 'openjdk*'
Note, selecting 'openjdk-11-source' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-dcevm' for glob 'openjdk*'
Note, selecting 'openjdk-11-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-11-dbg' for glob 'openjdk*'
Note, selecting 'openjdk-11-doc' for glob 'openjdk*'
Note, selecting 'openjdk-8-jdk-headless' for glob 'openjdk*'
Note, selecting 'openjdk-7-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-zero' for glob 'openjdk*'
Note, selecting 'openjdk-8-source' for glob 'openjdk*'
Note, selecting 'openjdk-jre' for glob 'openjdk*'
Note, selecting 'openjdk-11-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-11-jre' for glob 'openjdk*'
Note, selecting 'openjdk-11-jre-zero' for glob 'openjdk*'
Note, selecting 'openjdk-7-jdk' for glob 'openjdk*'
Note, selecting 'openjdk-10-jdk-headless' for glob 'openjdk*'
Note, selecting 'openjdk-7-jre' for glob 'openjdk*'
Note, selecting 'openjdk-9-jdk-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-jre-headless' for glob 'openjdk*'
Note, selecting 'openjdk-11-jre-dcevm' for glob 'openjdk*'
Note, selecting 'openjdk-11-jdk-headless' for glob 'openjdk*'
Note, selecting 'openjdk-8-dbg' for glob 'openjdk*'
Note, selecting 'openjdk-8-doc' for glob 'openjdk*'
Package 'openjdk-6-jre-headless' is not installed, so not removed
Package 'openjdk-7-jdk' is not installed, so not removed
Package 'openjdk-6-jre' is not installed, so not removed
Package 'openjdk-7-jre' is not installed, so not removed
Package 'openjdk-7-jre-headless' is not installed, so not removed
Package 'openjdk-9-jre-headless' is not installed, so not removed
Package 'openjdk-jre' is not installed, so not removed
Package 'openjdk-9-jdk-headless' is not installed, so not removed
Package 'openjdk-10-jdk-headless' is not installed, so not removed
Package 'openjdk-8-jre-dcevm' is not installed, so not removed
Package 'openjdk-11-dbg' is not installed, so not removed
Package 'openjdk-11-doc' is not installed, so not removed
Package 'openjdk-11-jdk' is not installed, so not removed
Package 'openjdk-11-jdk-headless' is not installed, so not removed
Package 'openjdk-11-jre' is not installed, so not removed
Package 'openjdk-11-jre-headless' is not installed, so not removed
Package 'openjdk-11-source' is not installed, so not removed
Package 'openjdk-11-demo' is not installed, so not removed
Package 'openjdk-11-jre-dcevm' is not installed, so not removed
Package 'openjdk-11-jre-zero' is not installed, so not removed
Package 'openjdk-8-dbg' is not installed, so not removed
Package 'openjdk-8-demo' is not installed, so not removed
Package 'openjdk-8-doc' is not installed, so not removed
Package 'openjdk-8-jdk' is not installed, so not removed
Package 'openjdk-8-jdk-headless' is not installed, so not removed
Package 'openjdk-8-jre' is not installed, so not removed
Package 'openjdk-8-jre-headless' is not installed, so not removed
Package 'openjdk-8-jre-zero' is not installed, so not removed
Package 'openjdk-8-source' is not installed, so not removed
The following packages were automatically installed and are no longer required:
fonts-dejavu-extra java-common libasound2 libasound2-data libatk-wrapper-java libatk-wrapper-java-jni libgif7
libice-dev libpcsclite1 libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev
libxt-dev x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 140 not upgraded.

Wsl 是 Windows 内核上的 Linux 系统。您应该使用与安装 JVM 相同的 Linux 工具卸载它。

对于 Ubuntu 来说,这是典型的 apt 或 dpkg

如果您想完全重新开始,请删除该应用程序并重新安装。

相关内容

  • 没有找到相关文章

最新更新