ERROR: Your Java 8 preference is not a directory: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home code example
Example: brew install jdk 8
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8