Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing Java 8 JDK from Mac

So I installed the beta of JDK 8 a while ago to look at some of the examples. I thought for sure by now, it's easy to change between versions.

Doing some Play development with IntelliJ. For some reason, IntelliJ is compiling with 8 even though:

  • I have the compiler set in Preferences to use 1.6
  • Supposedly it's using SBT through external build, but sbt from the command line works
  • JAVA_HOME is pointing to JDK 6.

If I go to the Java Preferences page, it does show 8 installed, but there is no option to uninstall it and it doesn't see any of the other versions.

When I do which java, it tells me /usr/bin/java and I do /usr/bin/java -version and it returns 1.6.

Note: with a little fiddling, you can use IntelliJ and JDK7, see here.

like image 642
Rob Avatar asked Sep 26 '13 22:09

Rob


People also ask

Can I remove Java 8?

Windows users can safely uninstall older versions of Java: when installing Java 8 (8u20 and above) or. by using the Java uninstall tool or. by manually uninstalling Java for Windows.

Can I delete Java from my Mac?

If you can't locate or use Java's native installation files, or you can't remove Java from your Mac for any reason, you can use the system preferences to uninstall Java from your Mac. Before uninstalling Java, you may want to know which version of Java you have on your Mac.


1 Answers

I was able to unistall jdk 8 in mavericks successfully doing the following steps:

Run this command to just remove the JDK

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk<version>.jdk 

Run these commands if you want to remove plugins

sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin sudo rm -rf /Library/LaunchAgents/com.oracle.java.Java-Updater.plist sudo rm -rf /Library/PrivilegedHelperTools/com.oracle.java.JavaUpdateHelper sudo rm -rf /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist sudo rm -rf /Library/Preferences/com.oracle.java.Helper-Tool.plist 
like image 143
Samuel Alpoim Avatar answered Oct 17 '22 00:10

Samuel Alpoim