zoukankan      html  css  js  c++  java
  • jdk

    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 
     1 yum list|grep jdk
     2 
     3 java-1.7.0-openjdk-headless.ppc64le
     4 
     5 java-1.7.0-openjdk.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 
     6 
     7 java-1.7.0-openjdk-accessibility.ppc64le
     8 
     9 java-1.7.0-openjdk-demo.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 
    10 
    11 java-1.7.0-openjdk-devel.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 
    12 
    13 java-1.7.0-openjdk-javadoc.noarch 1:1.7.0.91-2.6.2.3.axs7 redflag-base 
    14 
    15 java-1.7.0-openjdk-src.ppc64le 1:1.7.0.91-2.6.2.3.axs7 redflag-base 
     1 yum -y install java-1.7.0-openjdk*(一定要把所有的1.7.0都装上,我就是装了其中一个没有javac编译器)
     2 
     3 java -version
     4 
     5 yum装完jdk环境变量配置:
     6 
     7 vim /etc/profile添加:
     8 
     9 export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.axs7.ppc64le
    10 export PATH=$JAVA_HOME/bin:$PATH
    11 
    12 source /etc/profile

    此为power服务器

  • 相关阅读:
    WeakReference体验
    扩展Jquery自定义的一个错误警告控件ErrorProvider
    提高WCF的吞吐效率
    (三)资源
    替换WCF默认序列化方式
    (二)画刷
    JS字符串函数扩展
    索引
    Jquery ajax传递复杂参数给WebService
    有意义的整数正则表达式
  • 原文地址:https://www.cnblogs.com/zeppelin/p/5569428.html
Copyright © 2011-2022 走看看