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服务器

  • 相关阅读:
    HDU 2836 Traversal 简单DP + 树状数组
    UVa 1402 Runtime Error 伸展树
    UVa 11922
    HDU 4358 Boring counting 树状数组+思路
    HDU 4351 Digital root 线段树区间合并
    LA 6187
    UPC 2224 / “浪潮杯”山东省第四届ACM大学生程序设计竞赛 1008 Boring Counting 主席树
    max 宏定义取消:error C2589: error C2059: 语法错误 : “::”
    QT+VTK 对接使用
    标准C++中的string类的用法总结
  • 原文地址:https://www.cnblogs.com/zeppelin/p/5569428.html
Copyright © 2011-2022 走看看