一眼就能看出来是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的更多相关文章

  1. linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    这两天我们的开发机重启了好几次,发现每次重启后我的tomcat总是没有启动.检查java路径,配置正确,后来拿普通账号启动tomcat时报如下的错: Neither the JAVA_HOME nor ...

  2. 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 ...

  3. 启动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 ...

  4. 普通用户操作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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. [转]Tomcat----Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    对于使用IDE开发的程序员来讲,并不是所有人都对自己用来吃饭的工具了如指掌.常在阴沟跑,哪能不翻船.为此我把自己使用Tomcat/Eclipse的一些经验教训整理了一下,会陆续的贴出来,也许会帮到和我 ...

  9. 解决JAVA_HOME nor the JRE_HOME environment variable is defined

    从别的地方复制了一个tomcat, 启动后一闪即退, 使用记事本打开 startup.bat文件, 在文件底部修改, 并追加如下内容 call "%EXECUTABLE%" run ...

随机推荐

  1. QTP连接MYSQL数据库方法

    1.首先安装mysql数据驱动,qtp在windows系统下操作连接mysql,所以下载mysql-connector-odbc-   5.1.8-win32.msi 下载地址:http://mysq ...

  2. select 1 from table

    1.select 1 from mytable;与select anycol(目的表集合中的任意一行) from mytable;与select * from mytable 作用上来说是没有差别的, ...

  3. 《JS权威指南学习总结--第二章词法结构》

    第二章词法结构 内容要点: 一.注释 1. //表示单行注释 2. /*这里是一段注释*/ 3.一般编辑器里加注释是:选中要加注释的语句,按 ctrl+/ 二.直接量 所谓直接量,就是程序中直接使用的 ...

  4. wps制作目录

    01 设置标题为.标题1.标题2,标题302 引用--插入目录03 配置文档结构图.查看--可快速回到目录

  5. shell 中的特殊符号的含义

    来源:http://blog.sina.com.cn/s/blog_62a151be0100x9rn.html 第四章 基本功 - 特殊符号 学习撰写 script 最迅速的捷径是观摩别人的 scri ...

  6. Inno Setup入门(七)——提供安装语言选项

    Inno Setup安装目录下有一个Languages的文件夹,该文件夹提供了可供使用的语言,通过在脚本中加入[languages]段,可以实现该项功能,实现代码如下: [setup] ;全局设置,本 ...

  7. vbscript语句

    'vbscript语句Call'[call] name [argumentlist]'把控制转移到函数或子程序.当调用函数或子程序时,Call是可写可不写的.但是如果你用了Call,那么argumen ...

  8. 简单粗暴的“Debug模式”

    在项目中,通常会遇到:调试程序和程序在线上运行时程序运行的参数不一样, 例如线上运行时程序是获取线上的机器的ip,而调试程序时,我们会指定一个ip进行调试. 又或者项目要与多个系统进行数据交换,调试的 ...

  9. table详解

    1.tr 元素定义表格行,th 元素定义表头,td 元素定义表格单元. tr内是th还是td可由自己定义,th,td可存在于任一行,th与td的区别在与th字体更粗 2.定义一个table默认有bor ...

  10. JPA 系列教程8-双向一对一共享主键

    双向一对一共享主键的ddl语句 CREATE TABLE `t_person` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(25 ...