zoukankan      html  css  js  c++  java
  • 启动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 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 2019-02-19 12:12:06 EST; 11s ago
      Process: 7551 ExecStart=/usr/local/tomcat/bin/startup.sh (code=exited, status=1/FAILURE)
    
    Feb 19 12:12:06 localhost.localdomain systemd[1]: Starting Tomcat...
    Feb 19 12:12:06 localhost.localdomain startup.sh[7551]: Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    Feb 19 12:12:06 localhost.localdomain startup.sh[7551]: At least one of these environment variable is needed to run this program
    Feb 19 12:12:06 localhost.localdomain systemd[1]: tomcat.service: control process exited, code=exited status=1
    Feb 19 12:12:06 localhost.localdomain systemd[1]: Failed to start Tomcat.
    Feb 19 12:12:06 localhost.localdomain systemd[1]: Unit tomcat.service entered failed state.
    Feb 19 12:12:06 localhost.localdomain systemd[1]: tomcat.service failed.

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

    参考:

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

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

  • 相关阅读:
    JFinal教程
    jvm总结
    函数初识【第十一篇】
    python基础【第十篇】
    python基础【第九篇】
    python基础【第八篇】
    python基础【第七篇】
    python基础【第六篇】
    python基础【第五篇】
    python基础【第四篇】
  • 原文地址:https://www.cnblogs.com/sea-stream/p/10404346.html
Copyright © 2011-2022 走看看