Reputation:
I'm having some problems trying to install the last version of Oracle Java JDk on my Mac running macOS Catalina 10.15.7.
Brief, when I use the java -version command I get this information:
I never ever installed Zulu, does it come with the Mac or do I have it because I have anaconda navigator? Sorry but I don't use very often Java, I'm more a Python person
Anyways, I also tried to uninstall Java completely and install Java from scratch, but I still get that version and Zulu.
I would be extremely grateful if someone could tell how to get rid of Zulu or if I can use Oracle Java JDK without uninstalling Zulu.
Thank you very much in advance
Upvotes: 8
Views: 11111
Reputation: 5168
I came here because I noticed the same. After running java_home
, it told me that I had something in my home folder too.
$ java -version
openjdk version "15.0.10" 2023-01-17
OpenJDK Runtime Environment Zulu15.46+17-CA (build 15.0.10+5-MTS)
OpenJDK 64-Bit Server VM Zulu15.46+17-CA (build 15.0.10+5-MTS, mixed mode)
$ /usr/libexec/java_home
/Users/<username>/Library/Java/JavaVirtualMachines/azul-15.0.10/Contents/Home
After removing it:
$ rm -rf Library/Java/JavaVirtualMachines/azul-15.0.10/
$ java -version
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Upvotes: 0
Reputation: 824
The website uninstall page is changed to this:
https://docs.azul.com/core/zulu-openjdk/uninstall/macos
Launch Terminal and navigate to the JavaVirtualMachines
directory:
cd /Library/Java/JavaVirtualMachines/
# Display the list of directories:
% ls -1
zulu-11.jdk
zulu-13.jre
zulu-15.jdk
Each directory corresponds to a version of Azul Zulu.
To uninstall a specific version of Azul Zulu, use the following command:
sudo rm -rf <zulu_directory>
# For example, to uninstall Azul Zulu 11 JDK, run:
sudo rm -rf zulu-11.jdk
There are two other locations that should not be rm
as they are shipped with the macOS
these are
# java_home
/usr/libexec
# java
/usr/bin/
# try to find them using
# at /usr/bin/ for example
#/usr/bin
ls -lgh | grep java | xargs -I {}
# you will get all the wheel
-rwxr-xr-x 52 wheel 164K May 10 06:30 java
-rwxr-xr-x 52 wheel 164K May 10 06:30 javac
-rwxr-xr-x 52 wheel 164K May 10 06:30 javadoc
-rwxr-xr-x 52 wheel 164K May 10 06:30 javah
-rwxr-xr-x 52 wheel 164K May 10 06:30 javap
-rwxr-xr-x 52 wheel 164K May 10 06:30 javapackager
-rwxr-xr-x 52 wheel 164K May 10 06:30 javaws
Upvotes: 7
Reputation: 45
For reference - in ubuntu 18.04 - the following would do:
rm -rf /usr/lib/jvm/*zulu*
rm -rf /var/lib/dpkg/info/zulu*
Upvotes: 1