Going on nearly 2 days wasted trying to get maven properly installed. These are my outputs. Why in the world is maven defaulting to some jdk I don't even have??? I have tried a million different solutios proposed from goole searches and nothing!!! Help. I have not made any changes to any config files such as mvn.sh
.
System: Mac
OS=Yosemite 10.10
Java=Oracle 1.8 JDK
contents of .bash_profile:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
export M2_HOME=/usr/local/Cellar/maven/3.2.3
export M2=$M2_HOME/bin
export PATH=$PATH:$M2_HOME/bin
terminal commands:
java -version ->
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
mvn -version ->
Error: JAVA_HOME is not defined correctly.
We cannot execute /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java