简体   繁体   中英

JAVA_HOME is not set currently. Please set JAVA_HOME in mac

JAVA_HOME is not set currently. Please set JAVA_HOME. I want to run appium programs but its throwing this weird error在此处输入图像描述

Even java_home path not displaying in terminal. Currently displaying blankJAVA_HOME 显示为空

My bash profile在此处输入图像描述

JAVA VERSION Is also getting displayed 在此处输入图像描述

The first bash line is incorrect.

export JAVA_HOME=$(/usr/libexec/java_home)

Should be:

export JAVA_HOME=/usr/libexec/java_home

try the following command:

  • vim.bash_profile (do you see export JAVA_HOME=$(/usr/libexec/java_home) under the file)?

If not then you need to add it there.

If already added then run source.bash_profile, it reloads the file. And the path is set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM