Java environment configuration in Windows, tomcat installation, javatomcat

Source: Internet
Author: User

Java environment configuration in Windows, tomcat installation, javatomcat

Problem description: Java and tomcat are the basis for Java web-related projects under Windows. Here we will record the configuration of the Java environment and the installation and configuration of tomcat.

Tools used: Windows, jdk installation package, and tomcat 9.0 installation package.

Procedure:

1. Configure Java environment variables.

Download and install jdk-> right-click my computer-> properties-> advanced system settings-> environment variables ", create the following three variables (edit if they already exist ):

JAVA_HOME: C: \ Program Files \ Java \ jdk1.8.0 _ 111 // jdk installation path, to the bin layer.

CLASSPATH: % JAVA_HOME % \ lib \ tools. jar;

Path: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;

Run "Java", "javac", and "Java-version" in cmd. If the installation is successful, no error message is displayed.

2. Install tomcat9.0.

Download tomcat and decompress it to the location where you want to install it. For the configuration of Java environment variables, create the following four variables (edit if they already exist ):

TOMCAT_HOME: C: \ Program Files \ tomcat // tomcat installation path, to the bin layer.

CATALINA_HOME: C: \ Program Files \ tomcat // same as above

Path: % CATALINA_HOME % \ bin

CLASSPATH: % CATALINA_HOME % \ lib \ servlet-api.jar

After configuration, run cd to C: \ Program Files \ tomcat \ bin in cmd and run the "service install Tomcat9" command.

Enter "http: // localhost" in the address bar of the browser. The following figure is displayed even if the installation is successful:

 

3. The default tomcat port is 8080. to modify the port, find "server." in the "conf" folder. xml, change 8088 of "Connector port = '000000'" in the file to your desired port number, save it, and restart tomcat.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.