Skip to content

Instantly share code, notes, and snippets.

@pigeonflight
Created September 13, 2019 18:47
Show Gist options
  • Save pigeonflight/0d850916aca37b0c4522682c2ca1a332 to your computer and use it in GitHub Desktop.
Save pigeonflight/0d850916aca37b0c4522682c2ca1a332 to your computer and use it in GitHub Desktop.
Installing Java8 on Mac with Homebrew

If you installed java with the Oracle installer, get rid of it:

sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin  
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane  
sudo rm -rf /Library/Application\ Support/Oracle/Java/ 
sudo rm -rf /Library/Java/JavaVirtualMachines 

If you installed java with brew, remove previously brew installed version of java

brew cask uninstall java

Install caskroom versions

brew tap caskroom/versions
brew cask install adoptopenjdk8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment