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,但不太智能的tomcat仍然没有自动识别出java_home路径。
linux解决方法:
编辑文件 /usr/local/tomcat/bin/catalina.sh (根据你自己的jdk路径进行修改) 在文件的正文开头,即正式代码前,大概在99行添加如下代码
1 export JAVA_HOME=/usr/local/jdk
2 export JRE_HOME=/usr/local/jdk/jre
修改后大概是下面的样子
01 # $Id: catalina.sh 1202062 2011-11-15 06:50:02Z mturk $
02 # -----------------------------------------------------------------------------
03
04 export JAVA_HOME=/usr/local/jdk
05 export JRE_HOME=/usr/local/jdk/jre
06
07 # OS specific support. $var must be set to either true or false.
08 cygwin=false
09 darwin=false
10 os400=false
11 case "uname
" in
12 CYGWIN) cygwin=true;;
13 Darwin) darwin=true;;
14 OS400*) os400=true;;
15 esac .....................
注意:Windows下请修改对应的 catalina.bat
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的更多相关文章
- 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 ...
- 普通用户操作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
在使用普通用户更新tomcat项目适合出现这个信息,Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At ...
- 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 ...
- JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program
已经安装了JDK1.7 和对应JRE 安装了tomcat8 都是解压版 并设置了JAVA_HOME.JRE_HOME 但Tomcat在启动过程中找不到 错误: the JRE_HOME environ ...
- Cannot find tomcat目录/bin/setclasspath.sh This file is needed to run this program
首先如果直接使用 root 用户来启动 tomcat 的话,是可以正常启动的. 但是我们在 Linux 中使用普通用户启动 tomcat 报了如下错误 Cannot find /developer/a ...
- Tomcat启动报错:This file is needed to run this program
Tomcat版本为 8.5.29. 1.情景 kill调用tomcat进程后,重启tomcat报如下错误: Cannot find /usr/local/apache-tomcat-/bin/setc ...
- linux下启动tomcat出现“This file is needed to run this program ”
使用sh startup.sh启动tomcat 出现This file is needed to run this program 原因.sh文件都不是可执行文件,于是找到命令: chmod +x * ...
- 启动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 的解决方案
解决方法,如下所示: 先看Tomcat的startup.bat,它调用了catalina.bat,而catalina.bat则调用了setclasspath.bat.只要在setclasspath.b ...
- 解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
找到启动路径所在的目录: cd bin/ vi catalina.sh 加入以下信息: export JAVA_HOME=/home/gongzi/http/jdk1.6.0_26 export JR ...
随机推荐
- [ios][swift]UIButton
参考:http://www.hangge.com/blog/cache/detail_529.html
- 模块commonjs AMD UMD
commonjs是用在服务器端的,同步的,如nodejs amd, cmd是用在浏览器端的,异步的,如requirejs和seajs 其中,amd先提出,cmd是根据commonjs和amd基础上提出 ...
- php 7.2 安装 mcrypt 扩展: mcrypt 扩展从 php 7.1.0 开始废弃;自 php 7.2.0 起,会移到 pecl
升级 php 7.2 后,使用微信提供的加解密代码时,提示 call to undefined function mcrypt_module_open() :大脑疯狂运转1秒钟后,得出结论:php 7 ...
- Java实现日历小程序【代码】
这个没啥难点的,主要是界面设计吧 界面就是这个样子 运行时请在src同目录下放上我女神的照片 -----------------------------------代码如下-------------- ...
- python打印ms
ct打印的是时间戳,时间戳的小数点后前三位为ms eg:1555644362.055328 ms = 055 import time ct = time.time() local_time = ...
- English trip V1 - 1.How Do You Feel Now? Teacher:Lamb Key:形容词(Adjectives)
In this lesson you will learn to describe people, things, and feelings.在本课中,您将学习如何描述人,事和感受. STARTER ...
- LeetCode--027--移除元素
问题描述: 给定一个数组 nums 和一个值 val,你需要原地移除所有数值等于 val 的元素,返回移除后数组的新长度. 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间 ...
- 20161212xlVBA工作表数据整理合并单元格
Sub NextSeven_CodeFrame() '应用程序设置 Application.ScreenUpdating = False Application.DisplayAlerts = Fal ...
- 1月28日周日,更新ruby到2.5.0版,rvm更新。
在学习Array的方法的时候,发现文档concat方法可以进行多个数组的添加,而我的不行,猜测是ruby版本没有更新. 查询2.31ruby版本的concat方法,果然和2.5版本的不一样. 于是准备 ...
- Python Install for windows X64
download python 3.7.2 for windows, https://www.python.org/ run python-3.7.2.exe