Summary of some points to note when registering Tomcat as a service

Summary of some points to note when registering Tomcat as a service

Here are some points to note when registering Tomcat as a service. The details are as follows:

insert image description here

After opening the interface, look at the environment variables below. If you don’t understand, it is recommended to learn what environment variables are. .

insert image description here

First of all, as shown in the figure above, these four environment variables must be present:
JAVA_HOME: points to the root directory of jdk
JRE_HOME: points to the jre folder under the jdk directory
CLASSPATH: points to the lib folder under the jdk directory
CATALINA_HOME: points to the root directory of tomcat

insert image description here

There are many places in the service.bat file that require these four environment variables. Missing any one of them will cause problems. Registration may not necessarily fail, but there will be some problems during operation.
I just wanted to save trouble and pointed to CATALINA_HOME and loaded PATH directly, which caused tomcat registration to fail. . . .

You can test it by dragging the service.bat file in the bin folder in your tomcat root directory into cmd and pressing Enter

insert image description here

The command appears, enter the command (the name is self-defined):

service.bat install Tomcat9 

insert image description here

One thing to note is, don’t assume that the sentence at the bottom, “The service '……' has been installed,” is correct. It's good enough if it appears, but the path in the framed area in the picture above must exist, otherwise there will be problems. This is what I suffered.

If the above path does not exist, uninstall Tomcat, reconfigure the environment variables, and then install it again. . .

Summarize

This concludes this article on several points to note when registering Tomcat as a service. For more information about registering Tomcat as a service, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

<<:  MySQL single table query example detailed explanation

>>:  Understanding v-bind in vue

Recommend

The difference between mysql outer join and inner join query

The syntax for an outer join is as follows: SELEC...

Why Nginx is better than Apache

Nginx has taken over the majority of the Web serv...

Vue implementation example using Google Recaptcha verification

In our recent project, we need to use Google robo...

Reduce memory and CPU usage by optimizing web pages

Some web pages may not look large but may be very ...

Getting Started Tutorial for Beginners ⑨: How to Build a Portal Website

Moreover, an article website built with a blog pro...

HTML5+CSS3 header creation example and update

Last time, we came up with two header layouts, on...

Web page text design should be like smart girls wearing clothes

<br />"There are no ugly women in the w...

Setting up shared folders in Ubuntu virtual machine of VMWare14.0.0

This is my first blog post. Due to time constrain...

The process of using vxe-table to make editable tables in vue

There is a table in the project that needs to be ...

VS2019 connects to mysql8.0 database tutorial with pictures and text

1. First, prepare VS2019 and MySQL database. Both...

Tudou.com front-end overview

1. Division of labor and process <br />At T...

How to solve the mysql ERROR 1045 (28000)-- Access denied for user problem

Problem description (the following discussion is ...

Complete Tutorial on Deploying Java Web Project on Linux Server

Most of this article refers to other tutorials on...