Skip to content
Advertisement

Why Maven uses JDK 1.6 but my java -version is 1.7

I have setup maven in my terminal, and when getting the version settings (using mvn -v) it seems it uses JDK 1.6, while I have JDK 1.7 installed. Is there anything wrong?

The commands I enter are these:

JavaScript
JavaScript
JavaScript
JavaScript

Advertisement

Answer

add the following to your ~/.mavenrc:

JavaScript

Second Solution:

echo export "JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.bash_profile

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement