How to configure environment variables in jdk1.7 and tomcat7.0

Source: Internet
Author: User
Tags apache tomcat

 

Jdk1.7 and atat7.0 configure environment variables (originally from the Network)

First, of course, configure JDK first:

My computer ---> properties ---> advanced system settings -----> Environment Variables

Next, configure: (My JDK is installed in D: \ Java)

System variable ----->

New {

Variable name: java_home

Value: D: \ Java \ jdk1.7.0 _ 01 (this item is required by Tomcat (not required by JDK). If this item is not configured, Tomcat cannot be started)

}

New {

Variable name: classpath

Value: D: \ Java \ jdk1.7.0 _ 01 \ bin (this item must be configured for JDK of other lower versions; otherwise, JDK cannot run; Tomcat can run without this option, I suggest you configure it to prevent bugs)

}

Edit path:

Append at the end of the variable value :{

D: \ Java \ jdk1.7.0 _ 01 \ bin; (for jdk1.70 (for other versions, classpath must be configured to run), only this JDK can be run)

}

Click OK.

Then configure the Tomcat 7.0.2 environment (my tomcat is installed under D: \ Tomcat ):

My computer ---> properties ---> advanced system settings -----> environment variable ---->

New {

Variable name: catalina_base

Value: D: \ apache-Tomcat-7.0.23.

}

New {

Name: catalina_tmpdir

Value: D: \ apache-Tomcat-7.0.23 \ Temp

}

Variable name: catalina_home

Value: D: \ apache-Tomcat-7.0.23.

}

Edit path:

Append the variable value {

D: \ apache-Tomcat-7.0.23 \ bin

}

Click OK.

Now, the environment variable to be run by Tomcat 7.0.2 has been configured. Then start Tomcat

You can click Tomcat \ bin \ Startup to start Tomcat or start it at the command prompt:

C: \ User \ Dong xinqiang \ D:

D: \> Tomcat \ bin \ Startup

Start

Open the browser and enter http: \ localhost: 8080 \

Then set the Manager:

Open the tomcat/CONF/tomcat-users.xml file and add the following code: (here, I set my account to "admin", password to "123 ")

<Tomcat-users>
<Role rolename = "Manager-Gui"/>
<Role rolename = "admin"/>
<User Username = "admin" Password = "123" roles = "Manager-Gui, admin"/>

Since then, the settings have been basically completed.

If you want to use it with Eclipse, You have to configure it as follows:

Window) --> preferences --> server ----> runtime environment ----> Add ----> Apache --- Apache Tomcat V7 --> next --->-Tomcat installation directory browse to find the tomcat installation directory (for me, is D: \ Tomcat), click OK. Complete.

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.