How to install apache tomcat on windows

in this article, you will learn how to install apache tomcat on windows.

apache tomcat

The Apache Tomcat software is an open-source implementation of the Java Servlet, Java Server Pages, and Java Expression Language technologies. The Java Servlet and Java Server Pages specifications are developed under the Java Community Process.

Apache Tomcat is a web server that is used to serve Java-based web applications. Tomcat is an essential component in many enterprise environments because of its simple configuration and its relatively small footprint.

Apart from showing you how to install Apache Tomcat on a Windows system. We will also provide instructions on how to configure Tomcat to run your web applications.

Before we begin, you will need to ensure that you have a JDK (Java Development Kit) installed on your system

JDK Installation

The Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (JavaDoc), and other tools needed in Java development.

To install JDK you will need to have administrator privileges on your machine.

The first step is to download the JDK installer from the Oracle website. You can find the latest version here.

  1. Double-click on the downloaded .exe file to launch the installer.
  2. Click "Next" on the first screen.
  3. On the next screen, select the installation folder for JDK and click "Next".
  4. The installer will start installing JDK in the selected folder. Once it is finished, click "Close".

Next, we need to set the JAVA_HOME environment variable to point to the folder where JDK is installed.

Setting up JAVA_HOME environment variable

Press the Windows key and search for environment variables


In the "System Properties" window, click on the "Environment Variables" button.

  1. Under "System variables", click on "New".
  2. In the "New System Variable" window, enter "JAVA_HOME" for the name and the path to your JDK installation for the value. For example:
C:\Program Files\Java\jdk18.0.1.1 

3. Click "OK" to save the new environment variable.

4. Close the "System Properties" window.

To test if the JDK was installed correctly and the JAVA_HOME variable is set correctly, open a command prompt and type

java -version

You should see an output as shown:


Once you have the JDK installed, you can proceed with the installation of Apache Tomcat.

Apache tomcat installation

Download the latest version of Apache Tomcat from the Apache Tomcat website.

Once the download is complete, run the installer. You will be presented with the following screen:

  1. Click Next to continue.
  2. Read and accept the terms of the license agreement, then click "I agree".
  3. Select the components you want to install. Change the type of install to full and click Next.
  1. Leave the configuration to default and click next.
  2. Specify the path to the JRE (Java runtime environment) then click next. This step is dependent on the installation of JDK.
  1. Specify the installation directory for Apache Tomcat and click Install to begin the installation process.
  2. When the installation is complete, uncheck 'Run Apache Tomcat' and 'Show read me' then click Finish.
  1. Tomcat server has successfully been installed. You can locate it by navigating to:
C:\Program Files\Apache Software Foundation\

Starting apache tomcat server

  1. To start the server, open run window by pressing on your keyboard
> win + R

Type services.msc

  1. Change the startup type for apache tomcat from automatic to manual.
  1. To do this, right-click and choose properties.
  2. Change the startup type to Manual, click start then Okay.
  1. To verify that Tomcat is up and running, open a web browser and navigate to http://localhost:8080/. You should see the Apache Tomcat welcome page.

Congratulations! You have now installed Apache Tomcat on your Windows machine.

We hope this article has helped you to get up and running with Apache Tomcat on your Windows system.

If you enjoy our content, please consider buying us a coffee to support our work:

Table of Contents
Great! Next, complete checkout for full access to GeekBits.
Welcome back! You've successfully signed in.
You've successfully subscribed to GeekBits.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.