I need to un install my JDK 1.8 version from my Mac 12.2.1 Montere. However much I try I could not get rid of it.
When I run $ java -version
, I get
openjdk version "1.8.0_322"
OpenJDK Runtime Environment Corretto-8.322.06.1 (build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM Corretto-8.322.06.1 (build 25.322-b06, mixed mode)
When I run $ which java
, I get
/usr/bin/java
When I run $ /usr/bin/java -version
, I get
openjdk version "1.8.0_322"
OpenJDK Runtime Environment Corretto-8.322.06.1 (build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM Corretto-8.322.06.1 (build 25.322-b06, mixed mode)
When I run $ ls -l /Library/Java/JavaVirtualMachines/
, I get
total 8
-rw-r--r-- 1 root wheel 98 Feb 4 11:10 package-lock.json
When I run $ sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_322.jdk
I get to nothing, except being asked for password
I want to manage my Java/JDK installation, management etc. with SDKMAN alone. With homebrew and sdkman it is getting confusing.
Following the docs => https://docs.oracle.com/javase/10/install/installation-jdk-and-jre-macos.htm#JSJIG-GUID-F9183C70-2E96-40F4-9104-F3814A5A331F
Note:
If the folder does not exists, it can be at higher directory before "/Users"
rm
command as a root user or by using thesudo
tool/Library/Java/JavaVirtualMachines/(your jdk1.8.0_322.jdk folder) For example, once inside of JavaVirtualMachines, run: