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.