I've been trying to uninstall all java versions from my mac by following:
% cd /Library/Java/JavaVirtualMachines
when I did ls into JavaVirtualMachines, I saw that there are no folders/ java versions available. However, when I do java --version, there is still a OpenJDK installed on my mac:
openjdk 11.0.17 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-11.0.17.8.1 (build 11.0.17+8-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.17.8.1 (build 11.0.17+8-LTS, mixed mode)
which java
returns /usr/bin/java
Any advice on how I can uninstall this openJDK version?
which java
which -a java | xargs readlink -f
return? (which -a java
gives you the paths of all java executables on your PATH, andxargs readlink -f
expands any symlinks in those paths).