0

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

nok
  • 1
  • 1
  • 1
    Possible duplicate of [Setting JAVA\_HOME environment variable on MAC OSX 10.9](https://stackoverflow.com/questions/22842743/setting-java-home-environment-variable-on-mac-osx-10-9) – Goibniu Feb 02 '18 at 17:09
  • Hi..like I said, this is working with previous versions of Mac OS not with Mac OS Sierra 10.13.3 – nok Feb 02 '18 at 17:12
  • I didn't use the $ you have on the export line – JPRLCol Feb 02 '18 at 19:08
  • I tried it without $ and am still getting the same error. – nok Feb 02 '18 at 23:34

0 Answers0