Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Uninstall Java 7 JDK on Mac OS X (Mountain Lion 10.8.4)

I tried searching for hours trying to figure out how to uninstall Java 7 JDK on my Mac since it kept crashing both Eclipse and some Minecraft mod packs. I tried to restore back to Java 6 JDK instead which is provided by Apple. I tried looking at Oracle's site to try to find out how to fix the problem. If you scroll down to the bottom of the page you'll see where it tells you do uninstall using sudo. I can't find the Java folder inside of Library, I try using the Go To Folder function too in Finder but it seems I cannot find it. I've also tried through Terminal and still cannot find the folder. It seems that no one else has had this problem before.. I've asked on forum sites and cannot find an answer. Please respond as quick as possible!

http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html

like image 487
user2644292 Avatar asked Aug 02 '13 02:08

user2644292


3 Answers

You can look inside:

/Library/Java/JavaVirtualMachines

If there is a folder of jdk.1.7 or similar, you can delete it. Restart your programs and they will get Java 1.6 as a default.

like image 115
Anastasios Andronidis Avatar answered Sep 19 '22 19:09

Anastasios Andronidis


If you can't find the Java Home, open up terminal and enter:

env

look for or SOMETHING LIKE THIS Mine might not be the same as yours

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.7/Home

This is where your Java is installed

If you want to see it in Finder then open up Finder and press Command + Shift + G and enter in the path to java home.

to uninstall simply remove the java version from :

/System/Library/Java/JavaVirtualMachines

with

cd /System/Library/Java/JavaVirtualMachines
rm -r some.version.java.jdk

Note: Sometimes Java is install in /System/Library but sometimes it's installed on /Library, so that's why you couldn't find Java in /Library which the Oracle document suggested.

like image 42
Louis Hong Avatar answered Sep 19 '22 19:09

Louis Hong


in my current case: sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk

like image 33
tangrammer Avatar answered Sep 21 '22 19:09

tangrammer