标签:
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服务器
标签:
原文地址:http://www.cnblogs.com/womars/p/5569428.html