首页 > 编程语言 > 详细

Jenkins启动Tomcat时提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

时间:2019-04-01 11:47:56      阅读:450      评论:0      收藏:0      [点我收藏+]

 


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

原文:https://www.cnblogs.com/gcgc/p/10635428.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!