Download install tomcat, how do I configure environment variables? Does the configuration process have errors as often as the author?
Please read the text carefully and the precautions.
- 1
I. Installing JDK and TOMCAT
1. Install JDK: Run the Jdk-7-windows-i586.exe executable directly and install it by default.
Note: The path can be other drive letter, not recommended path contains Chinese name and special symbols.
2. Install Tomcat: Directly unzip the download file "Apache-tomcat-7.0.33-windows-x86.zip" to the C drive. The installation path is recommended to be modified to: C:\tomcat.
Note: The following is an executable file, double-click to run, the default installation.
- 2
Ii. Configuring the JDK environment variables (see How to configure environment variables in steps)
1, new variable name: java_home, Variable value: C:\Program files\java\jdk1.7.0
2, open path, add variable value:%java_home%\bin;%java_home%\jre\bin
3, new variable name: CLASSPATH, Variable value:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar
Note:
1,. Represents the current path,%java_home% is referring to the previously specified java_home;
2,java_home indicates the JDK installation path, which includes folders such as Lib,bin,jre, Tomcat,eclipse, and so on, which need to be dependent on this variable.
3,path allows the system to identify Java commands under any path.
4,classpath is the Java load class or lib path, only the class is in Classpath and the Java command is recognized.
- 3
Third, test the JDK
Enter the Javac,java,javadoc command under the cmd command: A graphical interface appears indicating that the installation was successful.
- 4
Iv. Configuring the Tomcat environment variable
1, new variable name: catalina_base, variable value: C:\tomcat
2, new variable name: catalina_home, variable value: C:\tomcat
3, open path, add variable value:%catalina_home%\lib;%catalina_home%\bin
- 5
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.
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".
- 6
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.
END
Precautions