1

I did navigate to /Library/Java/JavaVirtualMachines and removed the jdk, and there is nothing in that folder anymore. But my terminal shows I have some version of java, so I am a little confused, I wanna uninstall java completely from my laptop. I did uninstall JRE too using a set of commands.

steps to reproduce

java -version

output:

openjdk version "1.8.0_152-release" OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) OpenJDK 64-Bit Server VM (build 25.152-b01, mixed mode)

Devs
  • 23
  • 1
  • 5

2 Answers2

0

I assume that you still have files left in another folder. look up where file of the jdk are also stored.

Vini121
  • 41
  • 9
  • Look up this: https://docs.oracle.com/javase/10/install/installation-jdk-and-jre-macos.htm#JSJIG-GUID-577CEA7C-E51C-416D-B9C6-B1469F45AC78 Maybe it helps to remove everything in the /Library/Internet Plug-Ins and Library/PreferencePanes folders that is associated with jre – Vini121 Aug 11 '21 at 06:37
  • Maybe, you cant unsinstall the jdk 1 completely because the system needs at least one jdk installed. But I am not sure of this. May i ask why you want to uninstall this jdk version? – Vini121 Aug 11 '21 at 06:45
  • And have you rebooted your system after doing all this? – Vini121 Aug 11 '21 at 06:53
  • I am uninstalling to install jdk8 once this is removed.. and yes I have rebooted system after doing this – Devs Aug 11 '21 at 06:56
  • you dont have to uninstall any jdk to install another one. For example I have JDK 1,8,11,13 and 14 installed you can later configure your PATH to wich version you want to use. Dont uninstall this version maybe you need it one day. – Vini121 Aug 11 '21 at 07:21
0

Follow these steps: To Uninstall Java completely from your System.

  1. Click on the Finder icon located in your dock

  2. Click on the Utilities folder.

  3. Double-click on the Terminal icon

In the Terminal window Copy and Paste the commands below:

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
seenukarthi
  • 8,241
  • 10
  • 47
  • 68
Nishant Bangera
  • 176
  • 1
  • 1
  • 8