Maven, JAVA_HOME is not defined correctly on Mac OSX
来源:互联网 发布:东芝打印机网络连接 编辑:程序博客网 时间:2024/05/13 15:03
Apple recommends to set JAVA_HOME to “/usr/libexec/java_home
“, for example :
$ vim .bash_profile export JAVA_HOME=/usr/libexec/java_home $ source .bash_profile
But, when execute the Maven command, it prompts following error messages :
$ mvn -versionError: JAVA_HOME is not defined correctly. We cannot execute /usr/libexec/java_home/bin/java
Solution
To fixed it, update the JAVA_HOME
like following :
$ vim .bash_profile export JAVA_HOME=$(/usr/libexec/java_home) $ source .bash_profile
Run Maven again :
$ mvn -version Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)Maven home: /usr/share/mavenJava version: 1.7.0_05, vendor: Oracle CorporationJava home: /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jreDefault locale: en_US, platform encoding: UTF-8OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac"
Done.
0 0
- Maven, JAVA_HOME is not defined correctly on Mac OSX
- 执行maven命令 Error: JAVA_HOME is not defined correctly executing maven
- maven 配置(安装)以及遇到的The JAVA_HOME environment variable is not defined correctly.
- TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly
- The JAVA_HOME environment variable is not defined correctly
- TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly
- JRE_HOME错误 The JAVA_HOME environment variable is not defined correctly
- the java_home environment variable is not defined correctly
- Tomcat the java_home environment variable is not defined correctly
- TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly
- JRE_HOME错误 The JAVA_HOME environment variable is not defined correctly
- TOMCAT JAVA_HOME or JRE_HOME environment variable is not defined correctly
- 解决The JAVA_HOME environment variable is not defined correctly
- 解决The JAVA_HOME environment variable is not defined correctly
- maven 的一些配置和常见错误(The JAVA_HOME environment variable is not defined correctly. This environment vari)
- the java_home environment variable is not defined correctly This environment variable is needed to r
- 双击startup.bat,启动不了tomcat,JAVA_HOME environment variable is not defined correctly
- 双击startup.bat,启动不了tomcat,JAVA_HOME environment variable is not defined correctly
- 记录解决PHP后台上传图片,中文图片名乱码问题
- android自定义控件之滚动广告条
- Unable to execute dex: Java heap space Java heap space
- 用JavaScript实现图片轮番切换
- 求子数组的最大和
- Maven, JAVA_HOME is not defined correctly on Mac OSX
- 玻璃纤维短切毡生产线国内外状况研究
- ld: library not found for -lPods-AFNetworking的可能原因
- 无法在已有的 "xxxxxxx“上还原文件 "zzz"。请重新发出 RESTORE 语句,用 WITH REPLACE 来覆盖原先存在的文件
- Servlet容器模型(二)部署描述文件(web.xml)
- Lambdas异常:一个有点混乱的优雅解决方案
- UVA - 607 Scheduling Lectures
- 使用mongodb时常发生的几个错误
- VI中的多行删除与复制