DEV Community

Ram Shankar Yadav
Ram Shankar Yadav

Posted on

Bye Bye Oracle JDK, Hello OpenJDK on macos

After reading this post I wanted to remove Oracle JDK 8 from my system and install OpenJDK 11.

  • Before I started I checked my java version using java -version

checking version of java

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk

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

removing oracle jdk

  • After uninstalling installation was easy brew cask install java

installing OpenJDK using brew

  • Install and Check the java version again

installation and version check

That's it!

Cheers :)

Top comments (0)