Java Web Learning-environment building and Java Web getting started
Recently, I want to learn about JavaWeb. When setting up an environment, I found that there are many tutorials on the Internet, but I still need to find them one by one when I build my own environment. So I want to write down the appropriate environment.
1. Jdk environment Configuration
(1) environment variable name: JAVA_HOME
Variable value: D: \ Program Files (x86) \ Java \ jdk1.8.0 _ 121 (JDK installation path)
(2) environment variable name:CLASSPATH
Variable value:; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;
(3) environment variable name:PATH
Variable value:; % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;
2. tomcat environment Configuration
(1) environment variable name: CATALINA_HOME
Variable value: D: \ apache-tomcat-8.0.42-windows-x86 \ apache-tomcat-8.0.42
(2) environment variable name: Tomcat_HOME
Variable value: D: \ apache-tomcat-8.0.42-windows-x86 \ apache-tomcat-8.0.42
(3) environment variable name:CALSSPATH
Variable value:; % CATALINA_HOME % \ lib \ servlet-api.jar; (if jdk configuration is added, the value of this variable should be:; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar; % CATALINA_HOME % \ lib \ servlet-api.jar ;)
(4) environment variable name:PATH
Variable value:; % CATALINA_HOME % \ lib \ servlet-api.jar; (this step may be a bit redundant)
3. Configure maven Environment Variables
(1) environment variable name: maven_home
Variable value: D: \ apache-maven-3.3.9-bin \ apache-maven-3.3.9
(2) environment variable name:PATH
Variable value:; % maven_home % \ bin;
4. Configuration Verification
(1) Enter javac or Java-version in the jdk cmd console.
(2) tomcat start D: \ apache-tomcat-8.0.42-windows-x86 \ apache-tomcat-8.0.42 \ bin startup command (if the installation path is not the same, find their corresponding location)
Do not close this window and enter http: // localhost: 8080/in the browser/
(3) Input mvn-v in cmd
If an error is reported, the jdk version is too low or does not match. You can change the value of the Java_Home variable to a later JDK version.
Attached development tools:
1. jdk (http://pan.baidu.com/s/1eRFhEO6) Remarks: jdk1.6, 1.7, 1.8 all have
2. tomcat (http://tomcat.apache.org/download-80.cgi)
3. maven (http://mirrors.hust.edu.cn/apache/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.zip)
4. myeclipse (http://pan.baidu.com/s/1eRFhEO6)
5. mysql installation package (http://pan.baidu.com/s/1eRFhEO6)
6. sts (http://download.springsource.com/release/STS/3.8.4.RELEASE/dist/e4.6/spring-tool-suite-3.8.4.RELEASE-e4.6.3-win32-x86_64.zip)
7. eclipse (https://www.eclipse.org/downloads/eclipse-packages)