用這個打我的頭在牆上。使用Mac 10.10和我的Java的版本的作品,但MVN -version給我Maven即使設置了它也找不到Java
error: JAVA_HOME is not defined correctly. We cannot execute /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java
這不是連我正確的JDK。這裏是我的bash_profile的樣子:export
export JAVA_HOME=/Library/Java/JavaVirtualMachine/jdk1.8.0_25.jdk/Contents/Home
export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.3
export M2=$M2_HOME/bin
export MAVEN_OPTS=-Xms256m-Xmx512m
export PATH=$M2:$PATH
嘗試更改路徑條目訂購 – Basilevs 2014-10-30 04:13:56
感謝。試過,並沒有奏效。 – horatio1701d 2014-10-30 15:28:55
發現此解決方案: http://stackoverflow.com/questions/26661734/maven-not-recognizing-java-home-being-set-in-bash-profile?noredirect=1#comment42086840_26661734 – horatio1701d 2014-11-06 00:46:24