Tomcat, a server environment used by some software environments. For example, some of our web environments need to be built with tomcat. During the configuration process, we may encounter some problems, especially the problem of flash back. How to solve the problem of Tomcat flash back crash?
First, check environmental problems
Tomcat requires JRE to run. Generally, the startup crash is caused by the failure to find the JRE, which means that the environment variable was not configured properly when installing the JDK. Check whether the jdk is installed. Enter the command prompt, enter "java version", and press Enter. The jdk version appears, indicating that the installation is successful. If it does not appear, you can reconfigure the environment variables. Add the bin directory of the jdk installation path to the path variable to complete the configuration.
Second, add environment variables
After configuring the jdk, you need to add a JRE_ HOME environment variable, the value is the path of jre.
Third, the operating environment
We are adding JRE_ After the HOME environment variable, enter the bin directory of the tomcat installation path, and double-click startup.bat.
Fourth, add JRE_ HOME environment variable
At this time, we can see that tomcat is successfully started without crashing. This indicates that tomcat needs jdk and jre support. After installing the jdk, you need to add a JRE_ HOME environment variable.
Then after starting tomcat, we can enter "localhost: 8080/" in the browser and see the icon of tomcat, which indicates that the Tomcat startup crash has been successfully solved. If a security group is set, port 8080 needs to be released.
Set bin startup.bat
Add before the first line of the bin startup.bat file:
SET JAVA_ HOME=(JDK directory)
SET CATALINA_ HOME=(Tomcat directory after decompression)
If the environment variable setting is OK, but Tomcat flash back still occurs, you can try to change the JRE version. Tomcat 10.0 can run normally when the JRE version is changed to JRE10.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge