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
- The first step was to remove Oracle JDK, which I found instructions here.
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
- After uninstalling installation was easy
brew cask install java
- Install and Check the java version again