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

CSS element hiding principle and display:none and visibility:hidden

1. CSS element hiding <br />In CSS, there ar...

Toolkit: A more powerful front-end framework than Bootstrap

Note: Currently, the more popular front-end frame...

Solution to the conflict between two tabs navigation in HTML

Let's start with a description of the problem...

In-depth understanding of this in JavaScript

In-depth understanding of this in Js JavaScript s...

15 JavaScript functions worth collecting

Table of contents 1. Reverse the numbers 2. Get t...

Detailed installation process of nodejs management tool nvm

nvm nvm is responsible for managing multiple vers...

The front-end page pop-up mask prohibits page scrolling

A problem that front-end developers often encount...

Detailed explanation and extension of ref and reactive in Vue3

Table of contents 1. Ref and reactive 1. reactive...

What to do if you forget the initial password of MySQL on MAC

The solution to forgetting the initial password o...

Docker's flexible implementation of building a PHP environment

Use Docker to build a flexible online PHP environ...

Three ways to configure JNDI data source in Tomcat

In my past work, the development server was gener...

Detailed steps for Python script self-start and scheduled start under Linux

1. Python automatically runs at startup Suppose t...

Tutorial on installing mysql5.7.17 via yum on redhat7

The RHEL/CentOS series of Linux operating systems...

How to manually upgrade the kernel in deepin linux

deepin and Ubuntu are both distributions based on...