码迷,mamicode.com
首页 > 其他好文 > 详细

jdk

时间:2016-06-08 12:08:13      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:

maven编译时出错,原因yum安装完jdk没有javac编译器

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.781 s
[INFO] Finished at: 2015-03-25T11:22:14+08:00
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following

yum list|grep jdk

java-1.7.0-openjdk-headless.ppc64le

java-1.7.0-openjdk.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 

java-1.7.0-openjdk-accessibility.ppc64le

java-1.7.0-openjdk-demo.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 

java-1.7.0-openjdk-devel.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 

java-1.7.0-openjdk-javadoc.noarch 1:1.7.0.91-2.6.2.3.axs7 redflag-base 

java-1.7.0-openjdk-src.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base

yum -y install java-1.7.0-openjdk*(一定要把所有的1.7.0都装上,我就是装了其中一个没有javac编译器)

java -version

yum装完jdk环境变量配置:

vim /etc/profile添加:

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.axs7.ppc64le
export PATH=$JAVA_HOME/bin:$PATH

source /etc/profile

此为power服务器

jdk

标签:

原文地址:http://www.cnblogs.com/womars/p/5569428.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!