Error: According to the prompt can be seen, java_home environment variable configuration errors, need to reconfigure.
1. View Java version
Turn on your Mac, view the Java version, open Terminal Terminal, and view the Java version by command
lucky:~ administrator$ java-"1.8.0_162"1.8. 0_162- - 25.162-b12, Mixed mode)
2. Check the Java installation path:
lucky:~ administrator$ which Java/usr/bin/java
Note that this path does not find the true path of Java, so use the following command
Use/usr/libexec/java_home-v to get the true path to Java. Enter the following directly at the terminal:
lucky:~ administrator$/usr/libexec/java_home-vmatching java Virtual machines (1): 1.8. 0_162, x86_64: "Java SE 8" /library/java/javavirtualmachines/jdk1 . 8. 0_162.jdk/contents/Home/library/java/javavirtualmachines/jdk1. 8. 0_162.jdk/contents/home
3. Setting Java_home Environment variables
If you are not currently in the root directory, use the CD to switch to the root directory, see the following code:
lucky:~ administrator$ Touch ~/. Bash_profile //Create . bash_profile file
Lucky:~ administrator$ Open ~/.bash_profile //Open. bash_profile file
Enter the following in the open. Bash_profile file:
Export java_home=$ (/usr/libexec/java_home) export PATH= $JAVA _home/bin: $PATHexport class_path=$ Java_home/lib
After the input is complete, save, and again enter the following in the terminal to make the content added to the. bash_profile file Effective
lucky:~ administrator$ Source ~/.bash_profile
Complete the above operation and enter Appium-doctor again to see that the configuration is successful.
Appium---"Resolved" How Mac computers can view the installation path of Java and the configuration of Java_home environment variables