Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
一眼就能看出来是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
http://blog.csdn.net/zhangpengyu321/article/details/12144497
配置tomcat参考:
http://blog.csdn.net/ithomer/article/details/7827045
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总是没有启动.检查java路径,配置正确,后来拿普通账号启动tomcat时报如下的错: Neither the JAVA_HOME nor ...
- 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
[root@localhost META-INF]# systemctl start tomcat Job for tomcat.service failed because the control ...
- 普通用户操作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 ...
- tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
windows系统: 部署了一个Tomcat8.5.15,bin目录下startup.bat执行,结果提示Neither the JAVA_HOME nor the JRE_HOME enviro ...
- 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 ...
- Jenkins启动Tomcat时提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Jenkins构建提示: [SSH] executing...Neither the JAVA_HOME nor the JRE_HOME environment variable is defi ...
- [转]Tomcat----Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
对于使用IDE开发的程序员来讲,并不是所有人都对自己用来吃饭的工具了如指掌.常在阴沟跑,哪能不翻船.为此我把自己使用Tomcat/Eclipse的一些经验教训整理了一下,会陆续的贴出来,也许会帮到和我 ...
- 解决JAVA_HOME nor the JRE_HOME environment variable is defined
从别的地方复制了一个tomcat, 启动后一闪即退, 使用记事本打开 startup.bat文件, 在文件底部修改, 并追加如下内容 call "%EXECUTABLE%" run ...
随机推荐
- js 条件判断放大字体
<html> <head> <meta charset="utf-8" /> <title></title> <s ...
- why TCP guarentee delivery?
Simple idea: just use a TIMEOUT, if no answer after a certain seconds, just re-deliver!
- flash Ane
1.ANE简介 Adobe AIR Native Extension,Adobe AIR的本地扩展,简称ANE.什么叫本地扩展?因为Adobe AIR是跨平台的一个运行时,可以在Windows,Mac ...
- jq插件开发总结
http://www.cnblogs.com/silverLee/archive/2009/12/22/1629925.html jQuery插件的开发包括两种: 一种是类级别的插件开发,即给jQue ...
- url重写步骤
url重写:在global文件中,在application_BeginRequest事件中1:获取URL string url=Request.AppRelativeCurrentExecutionF ...
- 关于在MyEclipse中页面中文乱码的问题
1.首先在Window>preferences>General>Workspace中改为UTF-8. 2.将项目的Properties>Resource改为UTF-8. 3.将 ...
- Spring Boot 系列教程16-数据国际化
internationalization(i18n) 国际化(internationalization)是设计和制造容易适应不同区域要求的产品的一种方式. 它要求从产品中抽离所有地域语言,国家/地区和 ...
- C、C++、java的区别
经常听到有人在抱怨这个语言哪里哪里 不好,那个语言又是如何的优秀.对于这样 的牢骚,我只是一笑而过. 就我而言,语言只是工具,没有好坏之 分.只要你采用相应的语言,完成对应的工 作,那你的目标就完成了 ...
- linux命令-sed,uniq,cut,wc
sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序. sort语法 ...
- HDOJ3743<分治>
题意:求一个排列的逆序数. #include<cstdio> #include<iostream> #include<algorithm> const int ma ...