Bin directory for $JAVA_HOME is not set

HI Everyone,
I am new to automation I am getting error for Bin directory for $JAVA_HOME is not set in appium doctor command. I have set the path of java home: for java home I am getting positive response :
:heavy_check_mark: JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
but for Bin I am getting this error:
:heavy_multiplication_x: Bin directory for $JAVA_HOME is not set

Please help me with this issue.

1 Like
1 Like

CMD command : vim .bash_profile or vim ~/.profile

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
export ANDROID_HOME=/Users/sharadgupta/Documents/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

copy paste the above 4 lines in terminal and save.