After Tomcat8 is installed, click on the startup and the solution to crash back

1. First, configure the environment variables of jdk, remember that the environment variables of jdk are not jre!

2. Click [System Variables]-[New], and add environment variables of CATALINA_BASE and CATALINA_HOME, TOMCAT_HOME and JAVA_HOME. The values ​​of the variables are the corresponding file directories.

Configuration of environment variables of TOMCAT_HOME.

 

3. Select "path" and click edit

 

4. Enter the editing interface, click [New], add %JAVA_HOME%\bin and %TOMCAT_HOME%\bin and click [OK];

5. Finally, enter the Tomcat bin and find startup.bat, double-click to open it, and then you can start Tomcat normally, and you can also access Tomcat normally.

6. If the crash still occurs, you can edit startup.bat and add the following content in the header, where JAVA_HOME is the directory corresponding to jdk, and CATALINA_HOME is the directory corresponding to Tomcat.

SET JAVA_HOME=D:\jdk-1.8
SET CATALINA_HOME=D:\Tomcat\apache-tomcat-8.5.34

As shown below:

 

7. After clicking Tomcat8w.exe, a solution to the Tomcat service not being installed appears:

After entering cmd, enter the bin directory of Tomcat, enter the domain service install and click Enter. Be sure to enter the directory of the file. As shown below:

After performing the above operations, you can click Tomcat8w.exe to enter the service, click [start] and click [OK]

You can also click on the service to modify it to automatic;

Guess you like

Origin blog.csdn.net/h610443955/article/details/83011623