zoukankan      html  css  js  c++  java
  • Jenkins启动Tomcat时提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

     

    Jenkins构建提示:

    [SSH] executing...
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program

    解决办法:

      方法1:直接在在脚本前添加java环境变量

      方法2:如果是在 /etc/profile 中导入的环境变量,那么在/root/.bashrc中加入相同环境变量

      

    export JAVA_HOME=/root/jdk/jdk1.8.0_171
    export PATH=$JAVA_HOME/bin:$PATH
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export JRE_HOME=$JAVA_HOME/jre
    

      

      

  • 相关阅读:
    日期格式
    v-model修饰符
    从0到1构建全栈知识体系
    Element组件,v-for循环,表单验证方法
    上传文件转换为base64图片
    gulp4进阶
    gulp4快速入门
    TS-接口
    webpack4.0高级
    webpack4.0基础
  • 原文地址:https://www.cnblogs.com/gcgc/p/10635428.html
Copyright © 2011-2022 走看看