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

  • 相关阅读:
    KMP模板
    洛谷 [P2701] 巨大的牛棚
    浅谈用极大化思想解决最大子矩阵问题
    洛谷 [P1578] WC2002 奶牛浴场
    洛谷 [P1040]加分二叉树
    洛谷 [P1220] 关路灯
    清北学堂复习笔记
    一些比较实用的网站
    图论模板
    一些应该注意的问题
  • 原文地址:https://www.cnblogs.com/zeppelin/p/5569428.html
Copyright © 2020-2023  润新知