java - Maven uses wrong jdk -
i have env.variable $java_home points folder jdk7 if execute "mvn -version" see next
macbook-pro-erik:~ erik$ mvn -version 728-version apache maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 06:15:32+0400) maven home: /users/erik/distribs/maven/apache-maven-3.1.0 java version: 1.6.0_51, vendor: apple inc. java home: /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home default locale: en_us, platform encoding: macroman os name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac"
how enforce maven use correct jdk? have java.lang.unsupportedclassversionerror becouse of issue :(
solved by:
echo java_home=`/usr/libexec/java_home -v 1.7` | sudo tee -a /etc/mavenrc
Comments
Post a Comment