How to configure Java and Tomcat environment variables (WIN7)

Source: Internet
Author: User

1. Where to configure environment variables:

Select the "Computer" right button and select Properties to enter the following interface:

Click "Advanced System Settings":

Select environment variables and configure them in the system variables:

2. Configure Java Environment variables:

New system variable, variable name: Path, for example, Java installed in the C Disk program folder, then the value of the variable entered:

%java_home%\bin;%java_home%\lib\dt.jar;%java_home%\jre\bin;

New CLASSPATH variable name, variable value input: ".;"

New java_home variable name, variable value (Java installed directory) input:

C:\Program files\java\jdk1.7.0_10;

3. Configure Tomcat Environment variables:

New system variable, variable name: catalina_home, variable value (directory to which Tomcat is extracted), such as:

E:\apache-tomcat-7.0.54;

Add after system variable path:

%catalina_home%\lib;%catalina_home%\lib\servlet-api.jar;%catalina_home%\lib\jsp-api.jar;

Be careful not to delete the original and to separate the variables from each other.

4.Tomcat Administrator configuration, locate Tomcat-users.xml in the Conf folder under the installation directory and open edit:

<role rolename= "Manager-gui"/>

<role rolename= "Admin-gui"/>

<user roles= "Admin-gui" password= "admin888" username= "admin"/>

<user roles= "Manager-gui" password= "Tomcat" username= "Tomcat"/>

If the cmd window flashes when the Tomcat service is turned on, there may be an error in the Java environment variable configuration.

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.