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

  

  

Jenkins启动Tomcat时提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined的更多相关文章

  1. tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable

    linux 下 启动tomcat 报: Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt least o ...

  2. tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

      windows系统: 部署了一个Tomcat8.5.15,bin目录下startup.bat执行,结果提示Neither the JAVA_HOME nor the JRE_HOME enviro ...

  3. Tomcat问题: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

    一眼就能看出来是jdk的环境有问题,但是用了这么久的jdk一直都配置的好好的,怎么一到Tomcat上就这么矫情了. 最后查解决方案,原来是我的jdk从官网直接下载的,虽然我修改了java_home,但 ...

  4. linux tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    解决方法: 1.先找出java安装路径 $ which java /data/apps/java/jdk1.8.0_91/bin/java 2.在catalina.sh中加入配置 JAVA_HOME= ...

  5. [转]Tomcat----Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    对于使用IDE开发的程序员来讲,并不是所有人都对自己用来吃饭的工具了如指掌.常在阴沟跑,哪能不翻船.为此我把自己使用Tomcat/Eclipse的一些经验教训整理了一下,会陆续的贴出来,也许会帮到和我 ...

  6. 启动tomcat 报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    [root@localhost META-INF]# systemctl start tomcat Job for tomcat.service failed because the control ...

  7. CentOS Tomcat启动 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    链接:http://blog.csdn.net/shangdiyisi/article/details/9477521 [bravoinfo@bravoinfo-hk-01 apache-tomcat ...

  8. linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    这两天我们的开发机重启了好几次,发现每次重启后我的tomcat总是没有启动.检查java路径,配置正确,后来拿普通账号启动tomcat时报如下的错: Neither the JAVA_HOME nor ...

  9. Java项目启动时候报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 解决办法

    今天在发布Java项目的时候又遇到    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  At leas ...

随机推荐

  1. 通过BeanFactoryPostProcessor来获取bean

    一.现在我们很多时候都在spring的容器中,进行bean的提取和操作,但是配置里面首先需要扫描相应的包来实现相关bean的注入 但是问题来了.如果我们在另外一个线程需要用的时候,并且没有配置扫描该类 ...

  2. 如何制作行政区划矢量图(shp格式)

    详细图文ArcGIS10.2破解版教程地址:http://jingyan.baidu.com/article/e73e26c0cb5c1324adb6a791.html 有时候想要一张shp格式的地方 ...

  3. MyBatis框架简介

    1.下载地址:下载地址:https://github.com/mybatis/mybatis-3/releases 2.MyBatis是什么? MyBatis 本是apache的一个开源项目iBati ...

  4. ZOJ - 3657-The Little Girl who Picks Mushrooms

    /*ZOJ Problem Set - 3657 The Little Girl who Picks Mushrooms Time Limit: 2 Seconds Memory Limit: 327 ...

  5. 6_bootstrap之导航条|轮播图|排版|表单元素|分页

    8.导航条 BootStrap已经提供了完整的导航条实例,通常情况下,我们仅需进行简单修改即可使用. 帮助手册位置:组件-------导航条 9.轮播图 BootStrap已经提供了完整的轮播图实例, ...

  6. uva-11234-表达式

    后缀表达式,使用队列计算,要求计算的结果一样,输出队列的输入串 表达式转二叉树,层次序遍历,先右孩子,然后字符串反转输出 #include <iostream> #include < ...

  7. Snackbar学习笔记

    官方推荐使用Snackbar代替Toast   Paste_Image.png Snackbar使用其实就是一句话,跟toast很相似: Snackbar.make(view,"消息已发出& ...

  8. HBase实验(CRUD和MR入库)

    目录 前期准备 在HBase shell中实现CRUD操作 1. 启动命令行客户端 2. 创建表 3. 删除.新增列族 4. 删除表teacher 5. 新增数据 6. 查看数据 用Java API实 ...

  9. js中元素结点的引用

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  10. for 续9

    -------siwuxie095                 for 拾遗:         一: for 语句里,do 后面一般会有括号,有括号就是复合语句, 假如需要用到括号里的变量,就需要 ...