简体   繁体   English

卸载 Java 版本 11 mac

[英]Uninstall Java version 11 mac

How to uninstall a specific java version from a mac?如何从 Mac 卸载特定的 Java 版本?

When I execute the following command:当我执行以下命令时:

/usr/libexec/java_home -V

I see the following.我看到以下内容。

Matching Java Virtual Machines (2):
    11.0.2, x86_64: "OpenJDK 11.0.2"    /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
    1.8.0_202, x86_64:  "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home

I want to uninstall just Java 11.0.2 and keep the second one.我只想卸载 Java 11.0.2 并保留第二个。

运行此命令,它将删除 JDK

sudo rm -rf /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk

为我工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM