tomcat启动时错误Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of th
来源:互联网 发布:卡司数据 编辑:程序博客网 时间:2024/06/05 20:15
安装好tomcat之后,发现除了使用sudo命令之外,执行命令 ./startup.sh
就会出现以下错误:
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不是通过yum安装的,是我从官网直接下载的,虽然我修改了java_home,但不太智能的tomcat仍然没有自动识别出java_home路径。
原因:
因为启动tomcat会调用tomcat安装文件中的startup.bat,而它调用了catalina.bat则调用了setclasspath.bat。因此需要在setclasspath.bat的开头手动声明环境变量。
解决:
用vim打开tomcat的bin目录下的setclasspath.sh,添加JAVA_HOME和JRE_HOME两个环境变量(下图红色方框内),两个环境变量路径为您安装的java JDK的路径。
windows下将export改为set即可。
保存并且退出即可。
阅读全文
0 0
- tomcat启动时错误Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of th
- Linux下tomcat启动Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of
- 启动Tomcat异常(Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of )
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined ;At least one of these enviro
- Linux下Tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one
- 启动tomcat时报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 的解决方案
- 启动tomcat时报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 的解决方案
- 解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- 重磅!景驰科技公司CTO Tony Han加入硅谷科技论坛!
- 漫步最优化二十三——一维优化
- animation-name使用简介(初级)
- 493. Reverse Pairs
- urllib和urllib2区别和常见用法
- tomcat启动时错误Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of th
- LinuxStudyNote(36)-Vim(2)-Vim使用技巧 :r、:map快捷键设置、:ab、添加注释快捷键、添加多行注释快捷键、邮箱添加快捷键
- 理解Java内部类 匿名内部类
- stuff.split("xxxx")
- leetcode 35. Search Insert Position(C语言,查询插入位置)19
- eclipse中Tomcat启动时报错Cannot assign requested address
- Java图片处理开源框架
- 数组的原地排序和保护排序
- 适配器设计模式