[root@localhost META-INF]# systemctl start tomcat
Job for tomcat.service failed because the control process exited with error code. See "systemctl status tomcat.service" and "journalctl -xe" for details.
[root@localhost META-INF]# systemctl status tomcat.service
● tomcat.service - Tomcat
Loaded: loaded (/usr/lib/systemd/system/tomcat.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue -- :: EST; 11s ago
Process: ExecStart=/usr/local/tomcat/bin/startup.sh (code=exited, status=/FAILURE) Feb :: localhost.localdomain systemd[]: Starting Tomcat...
Feb :: localhost.localdomain startup.sh[]: Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Feb :: localhost.localdomain startup.sh[]: At least one of these environment variable is needed to run this program
Feb :: localhost.localdomain systemd[]: tomcat.service: control process exited, code=exited status=
Feb :: localhost.localdomain systemd[]: Failed to start Tomcat.
Feb :: localhost.localdomain systemd[]: Unit tomcat.service entered failed state.
Feb :: localhost.localdomain systemd[]: tomcat.service failed.

打开tomcat的bin目录下的setclasspath.sh,手动加入两个环境变量

参考:

https://blog.csdn.net/to_baidu/article/details/52848620

https://www.cnblogs.com/purplestone/p/3964207.html

启动tomcat 报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined的更多相关文章

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

  2. Tomcat9+JDK 13报错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使用的是https://tomcat.apache.org/download-90.cgi Tomcat9 之前安装的JDK 13,有JAVA_HOME环境变量地址(C:\Program ...

  3. 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的环境有问题,但是用了这么久的jdk一直都配置的好好的,怎么一到Tomcat上就这么矫情了. 最后查解决方案,原来是我的jdk从官网直接下载的,虽然我修改了java_home,但 ...

  4. tomcat 启动 报错Neither the JAVA_HOME nor the JRE_HOME environment variable is definedtemp

    catalina.sh 加入环境 export JAVA_HOME=/usr/local/jdk1.7.0_79 export CATALINA_HOME=/home/sa/webserver/tom ...

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

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

  7. Java项目启动时候报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 解决办法

    今天在发布Java项目的时候又遇到    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  At leas ...

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

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

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

随机推荐

  1. 使用GoldenGate初始化的两种方式

    在使用OGG开始增量数据的实时复制之前,一般需要对当前的存量数据进行初始化,如果是同构数据库,则可以使用数据库自带的工具完成,比如Oracle DB中的rman, expdp/impdp等. 其实og ...

  2. Spring/SpringMVC/MyBatis(持久层、业务层、控制层思路小结)

    准备工作: ## 7 导入省市区数据到数据库中 1. 从FTP下载SQL脚本文件 2. 把脚本文件移动到易于描述绝对路径的位置 3. 进入MySQL控制台 4. 使用`xxx_xxx`数据库 5. 运 ...

  3. log4j2笔记 #04# Appender的三个基本款以及RollingFile的各种示例配置

    粗糙笔记,留着备用. 三个基本款分别是ConsoleAppender.FileAppender(以及他的堂哥RandomAccessFileAppender).RollingFileAppender( ...

  4. 获取ip,获取客户端浏览器,获取客户端访问操作系统,获取客户端访问设备

    /** * 获取ip */ public static function getIp() { if (getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CL ...

  5. socket - option编程:SO_REUSEADDR

    网友vmstat多次提出了这个问题:SO_REUSEADDR有什么用处和怎么使用.而且很多网友在编写网络程序时也会遇到这个问题.所以特意写了这么一篇文章,希望能够解答一些人的疑难. 其实这个问题在Ri ...

  6. oracle 11g禁用和强制direct path read

    一般在混合型环境中,大表在进行全表扫描或者走并行的时候一般会出现direct path read等待事件,如果在OLTP或者纯粹的DSS环境中,出现大量的direct path read直接路径读取, ...

  7. es修改数据类型

    环境:es版本:6.5.0 es创建好了mapping后是不允许修改字段类型的,要是我们想修改字段类型怎么办呢,我们可以采用reindex的方法实现,就是创建一个新的mapping,里面的字段类型按照 ...

  8. eclipse中的ctrl+H使用中的问题

    一.问题背景 ctrl+H其实包含好几个search如果是FileSearch,在第一个输入框是要搜索的文字,第二个是文件名(支持通配符:*.js或者*.*),下面是选择搜索的范围,然后点seach. ...

  9. 记录结果再利用的"动态规划"之背包问题

    参考<挑战程序设计竞赛>p51 https://www.cnblogs.com/Ymir-TaoMee/p/9419377.html 01背包问题 问题描述:有n个重量和价值分别为wi.v ...

  10. MATLAB小波包的分解与重构

    该文章用来直观上先感受一下小波包的分解与重构   例1 有一个信号,变量名为wave,随便找一个信号load进来就行了. t=wpdec(wave,3,'dmey'); t2 = wpjoin(t,[ ...