[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. puts函数

    1.puts函数是gets函数的输出版本,它把指定的字符串写到标准输出并在末尾添加一个换行符 #include <stdio.h> #include <stdlib.h> in ...

  2. TensorFlow练习24: GANs-生成对抗网络 (生成明星脸)

    http://blog.topspeedsnail.com/archives/10977 从2D图片生成3D模型(3D-GAN) https://blog.csdn.net/u014365862/ar ...

  3. org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within

    org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeo ...

  4. django中表单处理

    在web端与后端交互时,我们除了使用html原生的form标签,还可以使用django自带的表单. Django 提供广泛的工具和库来帮助你构建表单来接收网站访问者的输入,然后处理以及响应输入. HT ...

  5. js遍历对象所有的属性名称和值

    /* * 用来遍历指定对象所有的属性名称和值 * obj 需要遍历的对象 * author: Jet Mah * website: http://www.javatang.com/archives/2 ...

  6. windows10 hyper-v安装配置centos6.8

    27.PNG 选择最小化安装,并在界面下方选中自定义额外的安装包 28.PNG 选择额外的安装包 29.PNG 选择额外的安装包 30.PNG 终于开始安装了 31.PNG 安装完毕,重启 32.PN ...

  7. Java能抵挡住JavaScript的进攻吗?

    JavaScript的进攻 公元2014年,Java 第八代国王终于登上了王位. 第一次早朝,国王坐在高高的宝座上,看着毕恭毕敬的大臣,第一次体会到了皇权的威力. 德高望重的IO大臣颤悠悠地走上前来: ...

  8. es数据迁移脚本(python)

    #!/usr/bin/python # -*- coding: UTF-8 -*- # 文件名:indiceCreate.py import sys import base64 import time ...

  9. mvc 文件下载

    public class DownLoadHelper { /// <summary> /// WriteFile实现下载--测试通过 /// </summary> /// & ...

  10. vector.resize 与 vector.reserve的区别(转载)

    转载:https://blog.csdn.net/shuilan0066/article/details/3588478 reserve是容器预留空间,但并不真正创建元素对象,在创建对象之前,不能引用 ...