I am using Mac book pro with Mac OS Sierra 10.13.3 version. I have installed Java 8u151 version.
Java is installed properly.
I've created the .bash_profile in the root directory and set the below JAVA_HOME variable.
export JAVA_HOME=$(/usr/libexec/java_home)
When I do: source .bash_profile then it is showing: Illegal variable name.
I've checked with my friends and they have been using Mac OS 10.12 and have not faced any issues setting up this.
Can someone help me with this?
Thanks