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

  • 相关阅读:
    整理SVN代码-->正式环境的代码
    业务(1)
    在一个项目中跨领域调用接口的的实现
    一个java文件编译之后会产生多个class文件
    shutil模块
    shevle模块
    confiparser模块
    sys模块
    subprocess模块
    【ADO.NET】3、从TXT中导入数据到数据库
  • 原文地址:https://www.cnblogs.com/sea-stream/p/10404346.html
Copyright © 2011-2022 走看看