这两天我们的开发机重启了好几次,发现每次重启后我的tomcat总是没有启动。
检查java路径,配置正确,后来拿普通账号启动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不是通过yum安装的,是我从官网直接下载的,虽然我修改了java_home,但不太智能的tomcat仍然没有自动识别出java_home路径。

解决方法:
编辑文件 /usr/local/tomcat/bin/catalina.sh (根据你自己的jdk路径进行修改) 在文件的正文开头,即正式代码前

export JAVA_HOME=/usr/local/jdk

export JRE_HOME=/usr/local/jdk/jre

linux安装tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined的更多相关文章

  1. Tomcat Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

    一眼就能看出来是jdk的环境有问题,但是用了这么久的jdk一直都配置的好好的,怎么一到Tomcat上就这么矫情了. 最后查解决方案,原来是我的jdk从官网直接下载的,虽然我修改了java_home,但 ...

  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

      windows系统: 部署了一个Tomcat8.5.15,bin目录下startup.bat执行,结果提示Neither the JAVA_HOME nor the JRE_HOME enviro ...

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

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

  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. linux设备驱动--等待队列实现

    #include <linux/module.h> #include <linux/fs.h> #include <linux/sched.h> #include ...

  2. windows下ruby中显示中文的3种方法

    A: 1将x.rb编码为ascii格式 2 在x.rb开头加上 #code:gbk或者 #coding:gbk B: 1 将x.rb编码为utf-8格式 2 在x.rb开头加上 #code:utf-8 ...

  3. JVM学习--(七)性能监控工具

    前言 工欲善其事必先利其器,性能优化和故障排查在我们大都数人眼里是件比较棘手的事情,一是需要具备一定的原理知识作为基础,二是需要掌握排查问题和解决问题的流程.方法.本文就将介绍利用性能监控工具,帮助开 ...

  4. Word Break(动态规划)

    Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separa ...

  5. DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=2 (转载)

    http://blog.csdn.net/xiyuan1999/article/details/5706230 DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, ...

  6. Apache Solr vs Elasticsearch

    http://solr-vs-elasticsearch.com/ Apache Solr vs Elasticsearch The Feature Smackdown API Feature Sol ...

  7. Google揭开Mesa的神秘面纱——一个具备跨地域复制和近实时特性的可伸缩数据仓库

    http://www.infoq.com/cn/news/2014/08/google-data-warehouse-mesa Google发表了一篇新的论文,该论文描述了他们内部所使用的一个被称为M ...

  8. Pod install 之后 no such module

    官方文档在pod install之后的操作是: open App.xcworkspace 使用pod以后,项目的旧打开方式就不行了,必须到项目目录里面,打开“项目名.xcworkspace”这种方式来 ...

  9. java-将评论内容过滤特殊表情emoj符号,保存到mysql中

    正常操作评论,保存时,若评论内容含有特殊表情符号,后台将报错如下: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_ ...

  10. (汇总)os模块以及shutil模块对文件的操作

    ''' # os 模块 os.sep 可以取代操作系统特定的路径分隔符.windows下为 '\\' os.name 字符串指示你正在使用的平台.比如对于Windows,它是'nt',而对于Linux ...