Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 完美解决(tomcat error)
error:
Linux下启动和关闭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
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
SSH: EXEC: completed after 201 ms
SSH: Disconnecting configuration [192.168.43.25_env] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [1]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
原因:
因为启动tomcat会调用tomcat安装文件中的startup.bat,而它调用了catalina.bat则调用了setclasspath.bat。因此需要在setclasspath.bat的开头手动声明环境变量。
解决方案:
用vim打开tomcat的bin目录下的setclasspath.sh,添加JAVA_HOME和JRE_HOME两个环境变量(下图红色方框内),两个环境变量路径为您安装的java JDK的路径。
windows下将export改为set即可。
保存并且退出即可。
再次使用service tomcat start没报错,如下图所示
成功用service tomcat start开启tomcat服务。
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 完美解决(tomcat error)相关推荐
- 解决Neither the JAVA_HOME nor the JRE_HOME environment variable is defined问题
问题描述: 在cmd窗口使用 startup 命令启动Tomcat时,出现 Neither the JAVA_HOME nor the JRE_HOME environment variable is ...
- Tomcat服务器环境配置--查看bat文件(解决Neither the JAVA_HOME nor the JRE_HOME environment variable is defined问题)
1. Tomcat环境配置 环境变量配置,博主以为无非就是在系统变量[path]中加上Tomcat目录的bin文件夹路径呗,然后上网一搜,果然就是配置Tomcat的bin目录和lib目录,于是在系统变 ...
- pssh批量执行启动tomcat报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
文章目录 问题描述 问题分析 解决问题 问题描述 我这边一共4台主机,4台主机tomca路径一致.我想想通过pssh命令工具直接将4台主机的tomcat启动,命令如下: [root@hadoop-ma ...
- linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
这两天我们的开发机重启了好几次,发现每次重启后我的tomcat总是没有启动. 检查java路径,配置正确,后来拿普通账号启动tomcat时报如下的错: 1 Neither the JAVA_HOME ...
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Centos7.5 启动tomcat报错 报错: Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At ...
- jenkins 远程启动tomcat报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
异常现象: jenkins 远程启动tomcat报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 解决 ...
- 解决JAVA_HOME nor the JRE_HOME environment variable is defined
从别的地方复制了一个tomcat, 启动后一闪即退, 使用记事本打开 startup.bat文件, 在文件底部修改, 并追加如下内容 call "%EXECUTABLE%" run ...
- 解决Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these...问题
文章目录 1. 复现问题 2. 分析问题 3. 解决问题 4. 总结问题 1. 复现问题 今天把前端项目部署到本地tomcat下,在双击startup.bat时的弹框一闪而过,但不知道问题出现在哪里. ...
- 解决问题:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
错因: 没有定义JAVA_HOME 也没有jre 环境变量配置 也就是说,我们没有配置好jdk的环境变量 在双击启动apache-tomcat-8.5.31\bin\startup.bat 时,出现 ...
最新文章
- 关于内网linux系统如果安装nodejs,npm,express,mongodb,forever等
- Shiro安全框架【快速入门】就这一篇!
- kernel module required key not available
- javascript常用内置对象总结(重要)
- html城市手机搜索,原生js实现html手机端城市列表索引选择城市
- 小白猿简洁好看的个人介绍单页HTML5源码
- 联想微型计算机拆装图解,笔记本电脑的拆卸图解
- libaio在mysql中的作用,ubuntu安裝mysql遇到的坑----解決Mysql報錯缺少libaio.so.1
- 哪个说了算?漫谈网吧网络的稳定和安全(转)
- 《计算机组网试验-DNS域名服务协议 》杭州电子科技大学
- 树莓派打造智能语音控制系统
- RGB VGA显示时序
- 基于java的高校运动会管理系统的设计与实现--毕业论文(可仅作参考)
- 64位32位 java 浏览器,所有的Java小程序可以在64位JRE启用浏览器中运行?
- Nodejs 中运行 JS 代码
- 利用python进行探索性数据分析(EDA):以Kaggle泰坦尼克号数据集为例
- 论文阅读笔记《USAC: A Universal Framework for Random Sample Consensus》
- FM/FMM算法笔记
- iOS开发,导入c文件引发的Could not build module 'Foundation'问题
- BS EN ISO 4589塑料-用氧指数法测定燃烧行为-第2部分:室温测试