简体   繁体   中英

Uninstall Java version 11 mac

How to uninstall a specific java version from a mac?

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.

运行此命令,它将删除 JDK

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

为我工作

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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