I installed java8 with brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
but i think i messed things up,
when i type echo $JAVA_HOME
it gives /usr/bin/java
when i type java -version
it gives java version "1.8.0_311" Java(TM) SE Runtime Environment (build 1.8.0_311-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
when i type /usr/libexec/java_home
it gives /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
when i try to run hadoop everything starts except namenode.
when i type namenode -format
after start-all.sh it gives this error:
ERROR: JAVA_HOME /usr/local/opt/openjdk does not exist.