why maven use jdk 1.6 but my java -version is 1.7
来源:互联网 发布:淘宝店主实拍 编辑:程序博客网 时间:2024/06/06 10:59
119down voteadd 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:363 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:1123 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 add a comment
119down vote
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
3 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
23 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
0 0
- why maven use jdk 1.6 but my java -version is 1.7
- Why NOT Use My Index
- Registry key Error: Java version has value '1.8', but '1.7' is required
- 安卓编译提示You use OpenJDK but only Sun/Oracle JDK is supported.
- JAX-WS 2.2 API is required, but an older version was found in the JDK.
- maven插件 myeclipse 提示Eclipse is running in a JRE, but a JDK is required 解决方法
- Maven:Eclipse is running in a JRE, but a JDK is required 解决方法
- maven引用jar报错:spring-core:jar must be a valid version but is '${spring.version}
- Why FreeBSD Is My Favorite *nix OS
- Why is my div's height zero
- Why Go is my favorite programming language
- You asked for an OpenJDK 7 build but your version is java version "1.7.0_72" Java(TM) SE Runtime Env
- Agile PLM --- JAX-WS 2.2 API is required, but an older version was found in the JDK
- Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when……
- Eclipse添加maven之后报错 Eclipse is running in a JRE, but a JDK is required 解决方法
- Eclipse添加maven之后报错 Eclipse is running in a JRE, but a JDK is required 解决方法
- Eclipse添加maven之后报错 Eclipse is running in a JRE, but a JDK is required 解决方法
- Eclipse添加maven之后报错 Eclipse is running in a JRE, but a JDK is required 解决方法
- linux下解压zip文件时,文件名乱码的解决
- (4.1.19)【Android UI设计与开发】第06期:底部菜单栏(一)使用TabActivity实现底部菜单栏
- PAT 1002. A+B for Polynomials (25)
- ORACLE数值类型详解--NUMBER、BINARY_FLOAT、BINARY_DOUBLE、BINARY_INTEGER、FLOAT
- Android逆向经验总结
- why maven use jdk 1.6 but my java -version is 1.7
- storm应用场景(转载的)
- 一步一步写算法(之循环和递归)
- (4.1.20.1)利用Theme自定义Activity间的切换动画
- design_pattern_composite
- mybatis异常:Could not find result map java.util.Map 问题分析及解决
- (4.1.21)Android 主线程和线程之间相互发送消息
- select count(*)和select count(1)的区别
- Android Studio的使用之 简单设置