The startup.bat click crash problem in tomcat

1. What is startup.bat?

startup.bat is a batch file in the Tomcat server, used to start the Tomcat server. When the startup.bat file is run, it will perform a series of verifications and operations to ensure that the server can start normally. These operations include parsing and verifying whether the CATALINA_HOME environment variable is set, verifying whether the catalina.bat file exists, and checking whether there are parameters for starting startup.bat. If all verifications pass, startup.bat will call catalina.bat and pass in parameters to start the Tomcat server. In short, the role of startup.bat is to help users find catalina.bat and execute it to start the Tomcat server.

2. Solution

1. Check whether there is a port conflict with tomcat

(1) Win+R opens the run window, enter cmd to open the command line window

(2) Enter netstat -ano to check whether port 8080 is occupied. If it is occupied, turn it off. If not, skip this question and check question 2.

For example: I have an application occupying 8080. I go to the task manager to find this application based on the PID and close it.

Ctrl+Shift+Esc or Ctrl+Alt+Delete to open the Task Manager

1. Use PID to search for this process and end the task

2. Check whether any environment variables are not configured

(1) Win+I to open settings, search for advanced system settings, click on environment variables to see if there are environment variables for Java and tomcat

Example: tomcat environment variable configuration (similar to Java)

Click startup.bat again to start it. If it still doesn’t work, perform the following operations.

(2) Find the startup.bat writing path in the tomcat\bin directory

Click startup.bat again to start it and try it.

Guess you like

Origin blog.csdn.net/li_a_a/article/details/135045641