Installation of Apache Tomcat for OOP with Tecla
Tags: tutorial, java, beginners, ipn
Published: 2020-12-14 05:44:18

Well now it's time to talk about the practices using java for web applications. first of all we are going to need a server to run our developed apps, so in this post i will explain how to install apache tomcat for that purpose.

## Step 1: Download. 

You can download the latest stable version of apache in [this link](https://tomcat.apache.org/) in the download section (the latest stable version is the one below the "beta" version), in this case, and in this time, the stable version is the 9.0.41. 
![Apache tomcat home](https://dev-to-uploads.s3.amazonaws.com/i/x3f8erk08a7yhxxhgxi6.png)

![apache tomcat download section](https://dev-to-uploads.s3.amazonaws.com/i/l4q2rdod4pzohom1eeoz.png)

In this page you will select the zip file that fits with your type of OS in the section of "Binary distributions > Core" , in my case, I will download the file "64-bit windows zip". 

Configuring the apache server with the zip file is easier than configuring the executable, and if you don't need it anymore in the future, you can just delete the extracted files instead of fighting with the [un]installer.

![Apache Tomcat 9.0.41 page](https://dev-to-uploads.s3.amazonaws.com/i/ulrlraj6evr38kyndr7f.png)

## Step 2: Installation.

**Substep 1:** Once you have the zip file downloaded in your coputer, go to the "Program Files [x86 for 32 bits]" folder on your computer and add a new folder called Apache.
![new "Apache" folder](https://dev-to-uploads.s3.amazonaws.com/i/v80aihhwj5kjdom84i41.png)

**Substep 2:** Now unzip the file that you downloaded before, delete the zip file, move the unzipd folder to the "Apache" folder previously created, and there you have, Apache tomcat is now installed in your computer.
![Unzipped apache tomcat file](https://dev-to-uploads.s3.amazonaws.com/i/mhsfwtrxknsi72tndpuu.png)

![Installation finished](https://dev-to-uploads.s3.amazonaws.com/i/rrxsl8rjjnwb7hvel21d.png)

## Step 3: Environment variables Configuration.

Now it's time for the configuration of the environment variables to ease the use of the server.

**Substep 1:** On your keyboard press the "Win"+"Q" keys to open the search bar and search for the "environment variables" ("variables de entorno") and then click open.
![Windows search bar](https://dev-to-uploads.s3.amazonaws.com/i/2v1q18d5ya6py8as2d30.png)

**Substep 2:** Once the "System properties" windows appear click the "environmental variables" button.
!["System properties" window](https://dev-to-uploads.s3.amazonaws.com/i/srwhgashjoidvr30ppj6.png)

Once again we will mess up with the "CLASSPATH" environment variables, besides of the creation of a new envirnment variable.

**Substep 3:** First, we need to add a new environment variable with the following values.

| variable         | Value                                   |
|:----------------:|:----------------------------------------|
| TOMCAT_HOME      | the route of installation of the Server |

!["Environment variables" window](https://dev-to-uploads.s3.amazonaws.com/i/mw05pjyufqig06v10c83.png)

And when you are done, click the "Ok" button.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dajifww74f7xwujiuvee.png)

**Substep 4:** Now it's time to edit the "CLASSPATH" variable, click it twice from the list of variables, and at the end of the value of the variable put a semicolon (;) to separate the old values from the new one. Now add the value described in the table below. Once finished click "Ok" to exit the editor, then "Ok" again to exit the "Environment variables" window and once again to exit the "System properties" window.

| variable         | Value                                |
|:----------------:|:-------------------------------------|
| CLASSPATH        | %TOMCAT_HOME%\lib\*                  |

!["Environment variables" window](https://dev-to-uploads.s3.amazonaws.com/i/fyxe5oqmsba90cthbhr1.png)

!["Edit CLASSPATH variable" window](https://dev-to-uploads.s3.amazonaws.com/i/wfjalfvhldhmfccoav93.png)

and that's all, now you have configured Apache tomcat for your use, adding the value to the "CLASSPATH" variable will let you use the tools of the libraries from Apache Tomcat to develop your web apps.