Use sh startup.sh start tomcat error

 Today attempts to automatically update the web server installation package on the tomcat

When starting a python script found error:

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

I generally understand is this: you need to configure jdk and jre environment variables to run the program

 

 

 

 

 

Then check the server environment variables, it seems nothing issue:

 

 

 

And then view the file startup.sh: find startup.sh calls to catalina.sh file :

 

 

 

Then go see catalina.sh file: find catalina.sh calls setclasspath.sh file:

 

 

It is necessary in setclasspath.sh manually statement about the environment variables

Lazy point to vi / etc / profile to find your own environment variables pasted ha ha

export JAVA_HOME=/usr/java/jdk1.8.0_161

export JRE_HOME=/usr/java/jdk1.8.0_161/jre

 

(Windows version, corresponding to the bat file, export instead set)

To run the script and tomcat startup process, see Gangster: https://blog.csdn.net/qq_21508059/article/details/82713797

 

 

Guess you like

Origin www.cnblogs.com/Ternura-1023/p/11611915.html