linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 原创 2013年07月26日
来源:互联网 发布:手机淘宝账户设置在哪 编辑:程序博客网 时间:2024/06/06 01:26
linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is define
这两天我们的开发机重启了好几次,发现每次重启后我的tomcat总是没有启动。
检查java路径,配置正确,后来拿普通账号启动tomcat时报如下的错:
1
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
2
At least one of these environment variable is needed to run this program
原来是我使用的jdk不是通过yum安装的,是我从官网直接下载的,虽然我修改了java_home,但不太智能的tomcat仍然没有自动识别出java_home路径。
解决方法:
编辑文件 /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
阅读全文
0 0
- linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 原创 2013年07月26日
- linux安装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
- linux安装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
- 启动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
- Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
- ZXing基于Android Studio 的示例演示搭建
- 欢迎使用CSDN-markdown编辑器
- SQL中的case when then else end用法
- JS的垃圾回收机制与内存管理
- Java 方法
- linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 原创 2013年07月26日
- openwrt实现挂载usb摄像头及视频保存
- 有一个由0和1组成的数组。 用给定的m 0和n 1来形成的最大字符串数量。每个0和1最多可以使用一次。
- mybatis实现原理
- mqtt
- (转)Android开发实现高德地图定位详解
- Scala-集合
- 14个JavaScript调试技巧
- HTTP协议