Poltu
Poltu

Reputation: 137

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 enter image description here

Even java_home path not displaying in terminal. Currently displaying blank JAVA_HOME showing empty

My bash profile enter image description here

JAVA VERSION Is also getting displayed enter image description here

Upvotes: 1

Views: 2823

Answers (2)

shivani thakur
shivani thakur

Reputation: 229

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.

Upvotes: 1

Lucbel
Lucbel

Reputation: 339

The first bash line is incorrect.

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

Should be:

export JAVA_HOME=/usr/libexec/java_home

Upvotes: 0

Related Questions