Reputation: 99
I removed all the dependencies using the link Removing Java 8 JDK from Mac
But even after that java is not uninstalled from my system. If i run the command java -version
then i get the following result. I need to install java 7. But i am stuck at this point.
MacBook-Air:Library mislam$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
Is there anyone who faced similr problem before? Any help?
Upvotes: 1
Views: 418
Reputation: 215
for removing the java runtime you need to copy these two lines in your terminal
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefpane
then if you open the system prefrences you can see the java icon is gone
The java development kit is different than the runtime, and to remove that, you’ll need to run a different command and look in a different folder to see if it even is installed (usually it’s not). Open up a Terminal window and type in (or paste) the following command to switch to the correct folder:
cd /Library/Java/JavaVirtualMachines
And then use “ls” at the prompt to see if there is anything in there. if there was. So then you’ll type in the following:
sudo rm -rf jdk1
And then use the TAB key to make the shell complete the file name.
It’s easy enough to make sure that Java is completely dead. You should already have noticed that closing and reopening System Preferences is enough to make the icon there go away, but to be really sure, you can open up a terminal and simply type “java”. You’ll be presented with the message, “No Java runtime present, requesting install”.
And then a little dialog box will pop up with the OK button highlighted, indicating that everything is going to be OK now.
Upvotes: 3