Uninstall Java version 11 mac

ashish1512 :

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.

moritzg :

Run this command and it will remove the JDK

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=112060&siteId=1