JDK environment variable configuration-Tomcat environment setup

Source: Internet
Author: User
Tags apache tomcat

First, install 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.

Second, after installing the JDK configuration environment variables computer → properties → advanced system settings → advanced → environment variables

@1. User variable → new java_home variable .

Variable value fill in the JDK installation directory (I am E:\Java\jdk1.7.0) convenient the following reference, abbreviated configuration

@2. User variables → new path variable → edit (if added to the system variable, note that after the path is added; semicolon--inwindows; semicolon delimited path )

Enter%java_home%\bin;%java_home%\jre\bin at the end of the variable value;

@3. User variables → new CLASSPATH variable

Variable values are filled in.; %java_home%\lib;%java_home%\lib\tools.jar (Note that the previous point indicates the current path)

@4. Verify that the configuration is successfully run with cmd input java-version (there are spaces between Java and-version)

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

Third, Tomcat installation

: Directly unzip the download file "Apache-tomcat-7.0.33-windows-x86.zip" to the D disk under D:\brandstorm\tomcat.

Iv. Configuring the Tomcat environment variable

@1, new variable name: catalina_base, variable value: D:\brandstorm\tomcat

@2, new variable name: catalina_home, variable value: D:\brandstorm\tomcat

@3, open path, add variable value:%catalina_home%\lib;%catalina_home%\bin (remember path last semicolon delimited)

V. start the Tomcat service

Methods two kinds:

@1, method One: Enter the command under the cmd command: Startup, the following dialog box appears, indicating that the service started successfully.

Tomcat Server Open

@2, method Two: Right click on the desktop "My Computer", "Management", "services and Applications", "services", find the "Apache Tomcat" service, right click on the service, select "Properties", the "Startup Type" from "Manual" to "automatic".

VI. Test TOMCAT

Open the browser, enter http://localhost:8080 carriage return in the address bar, and if you see a JSP page from Tomcat, your JDK and Tomcat have been successfully built.

Attention:

The path in 1.java_home cannot end with a semicolon, such as C:\Program files\java\jdk1.7.0.

The path in 2.catalina_base,catalina_home,tomcat_home cannot end with "\".

3. When modifying the Add variable in an environment variable, be sure to note the semicolon, the space, and whether there are extra letters. The author is not successfully configured because there is one more letter in the path. If the configuration is unsuccessful, be sure to check again and again.

Above error, very prone to error: Catalina_home or java_home is not configured well.

If the error "The CATALINA_HOME environment variable is not defined correctly"

JDK environment variable configuration-Tomcat environment setup

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.