Java environment variables and Tomcat server configuration

Source: Internet
Author: User
Tags tomcat server

Tomcat server is a free open source Web application server, belongs to the lightweight application server, in small and medium-sized systems and concurrent access users are not widely used, is the first choice to develop and debug JSP programs. For a beginner, it can be thought that when the Apache server is configured on a single machine, it can respond to requests for access to the HTML (one application under the standard Universal Markup Language) page. The tomcat part is actually an extension of the Apache server, but it runs independently, so when you run Tomcat, it actually runs separately as a separate process from Apache.

Currently the latest version of Tomcat is 9.0, and today is a simple demonstration of the configuration of Tomcat 9 in the Windows environment.

First step: Configure a system-consistent JDK environment variable (32-bit/64-bit) (1) Download the JDK installation package:

Website:

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Select the appropriate installation package according to your operating system (you must choose to accept the license agreement)

(2) Installing the JDK:

Install JDK two installation prompts appear during installation of the installation directory. The first time is to install the JDK, and the second is to install the JRE. It is recommended that all two are installed in a different folder in the same Java folder. (cannot be installed in the Java folder root directory, JDK and JRE installed in the same folder will be error)

Installation is complete as shown

(3) Configuring environment variables

Configure environment variables after installing JDK computer → properties → advanced system settings → advanced → environment variables

System variables → new java-home variable.

Variable value fill in the JDK installation directory (I am C:\ProgramFiles\Java\jdk1.8.0_111)

System variables → find Path variable → edit

Enter%java-home%\bin at the end of the variable value;

(Note that the original path of the variable value at the end of there is no; number, if not, first enter; number and then enter the above code)

System variables → new CLASSPATH variable

Variable values are filled in.; %java_home%\lib;%java_home%\lib\tools.jar (Note that there is a point in the front)

System variable configuration is complete.

Step Two: Verify that the JDK is configured successfully (32-bit/64-bit)

Verify that the configuration is running successfully cmd input java-version (there are spaces between Java and-version)

If the version information is displayed, the installation and configuration are successful.

64 bits For example, there will be explicit version comments, if not, 32-bit

Step Three: TOMCAT9 installation configuration (1) Download TOMCAT9

Download the latest version of Tomcat

http://tomcat.apache.org/download-90.cgi

Download after the installation, this configuration demo after decompression I placed in the D:\Program Files\apache-tomcat-9.0.0.m15 directory.

Note distinguish 32-bit to 64-bit JDK, or start Tomcat-specific error 1

(2) CMD command configuration tomcat

(3) Start Tomcat

1. Double-click the Startup.bat batch in the bin directory to run Tomcat (the advantage is that you can see the running status, the database, and the code error.) Recommended use)

2. Run the Net STARTTOMCAT9 command with the Administrator run cmd (9 is the version number)

3, through the Task manager inside the service run

4. Double-click the Tomcat9w.exe punch in the Bin directory and click Start to run Tomcat, the following illustration shows:

(4) Successful demo

Java environment variables and Tomcat server configuration

Related Article

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.