add the following to your ~/.mavenrc
:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/{jdk-version}/Contents/Home
add the following to your ~/.mavenrc
:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/{jdk-version}/Contents/Home
|
yes,you answer is correct .The JAVAHOME is required.I edit the /etc/profile instead –
Ninja
Oct 13 '13 at 14:36
| ||
|
Well, adding to ~/.mavenrc ensures that other apps are not affected. Only mvn picks up this version of JDK. :) –
MasterGaurav
Oct 14 '13 at 2:19
| ||
|
Thank you! Finally maven in Eclipse compiles again...! –
jherranzm
Apr 12 '14 at 6:11
| ||
|
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7) –
jla
May 19 '14 at 11:21
| ||
|
wow. this is good. I just realized that the /etc/alternatives mess doesn't help me here. There is no alternative set up for the whole JDK. thanks. Saved me from asking a repeat question. –
Steve Cohen
Aug 8 '14 at 23:09
|