Appium Doctor - unable to set $JAVA_HOME/bin into PATH variable on MacOS 10.12

SergioLeone :

Installed appium doctor with npm on MacOS 10.12, and it gives me one error:

WARN AppiumDoctor ✖ Bin directory for $JAVA_HOME is not set.

I've tried everything I could so far, please help. Here is my .bash_profile:

export ANDROID_HOME="/Users/sergei/Library/Android/sdk/"
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
export M2_HOME="/Users/sergei/Desktop/1246702 Sergio/apache-maven-3.3.9"
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JYTHON_HOME="/Users/sergei/jython2.7.0/"
export JYTHON=JYTHON_HOME/bin
export PATH=JYTHON:$PATH

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
SergioLeone :

I removed double quotes from the paths and slashes from the end This is working fine for me now:

export ANDROID_HOME=/Users/sergei/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=453757&siteId=1