Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
2014-05-20 13:17
525 查看
一眼就能看出来是jdk的环境有问题,但是用了这么久的jdk一直都配置的好好的,怎么一到Tomcat上就这么矫情了。
最后查解决方案,原来是我的jdk从官网直接下载的,虽然我修改了java_home,但不太智能的tomcat仍然没有自动识别出java_home路径。
linux解决方法:
编辑文件 /usr/local/tomcat/bin/catalina.sh (根据你自己的jdk路径进行修改) 在文件的正文开头,即正式代码前,大概在99行添加如下代码
修改后大概是下面的样子
view
source
注意:Windows下请修改对应的 catalina.bat
最后查解决方案,原来是我的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 |
view
source
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
相关文章推荐
- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 错误&&Eclipse 访问tomcat首页报404错误
- 解决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
- 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
- TOMCAT7.0看来要做的还真多~~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
- linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 原创 2013年07月26日
- 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 At least one of these environment variable is needed to run this program
- 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
- tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable
- tomcat7.0以上版本运行startup的时候报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 error)
- 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 definedtemp