setting $JAVA_HOME and installing JDK

319 views Asked by At

I'm trying to install maven on my macbook OS X 10.10. It looked a bit complicated so I've find this step by step tutorial (https://www.youtube.com/watch?v=ghIvOYDs0BM) which looked very easy. The only problem was that:

echo $JAVA_HOME

didn't show anything although I do have JDK installed.

java -version

returns

java version "1.8.0_25"

I tried to set $JAVA_HOME manually but it didn't helped. So I went to the /usr/ or usr/lib/ where java should be located, nothing's here and spotlight even doesn't find "JVM"

Can anyone help me how to set $JAVA_HOME correctly? thanks!

1

There are 1 answers

0
Yusuf Kapasi On BEST ANSWER
set JAVA_HOME=your directory\jdk1.8.0_25;
set PATH=%PATH%;%JAVA_HOME%\bin