First, the installation and configuration of JDK
1, download the JDK from the official website, note that JDK is not the JRE. The JDK package contains the JRE. It is best to download it from official website. Portal: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. After downloading, install the JDK, install it directly according to the Installation Wizard, you can choose the installation path, my installation path is D:\Java\jdk1.8.0_144
3. Configure Java Environment variables: Right-click Computer-Properties-Advanced system settings-environment variables
In "System Variables", set 3 properties, Java_home,path,classpath (case does not matter), if already exist then click "Edit", do not exist then click "New";
(1) Java_home
Specify the JDK installation path, which is the path you chose when you just installed D:\Java\jdk1.8.0_144
( and no semicolon behind ) This path includes folders such as LIB,BIN,JRE (this variable is best set, because this variable is required to run tomcat,eclipse, and so on),
(2) Path
Allows the system to identify the JAVA command under any path, set as:%java_home%\bin; ( Note that there is a semicolon later )
(3) CLASSPATH
Java Load classes (class or LIB) path, only the class in Classpath, the Java command can be recognized, set to:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;
(to Add.) indicates the current path, preceded by a number and semicolon, and a semicolon at the end. Or can be written as ".; %java_home%\lib; " The same effect. )
4. When the environment variable is configured, test the JDK for installation success
Click Start-Run, type "cmd", and then type the command Java-version,java,javac, if the version number appears and the instruction help represents a successful
Second, the installation and configuration of Tomcat
1. Download the Tomcat Portal: http://tomcat.apache.org/download-90.cgi below select the corresponding version, here download 64-bit windows.zip to the left can choose other Tomcat version, download and unzip directly, This article unzipped the path D:\Program Files (x86) \APACHE-TOMCAT-9.0.0.M26
2. Set environment variables right-click My Computer-Properties-Advanced system settings-environment variables,
Add the following variable in the system variable
(1) tomcat_home, new system variable D:\Program Files (x86) \APACHE-TOMCAT-9.0.0.M26
This variable points to the path of the extracted file, which has lib, bin and other folders. (There is no semicolon behind it) and click "OK"
(2) Catalina_home, the value of the variable is the same as Tomcat_home, the same setting method (1)
(3) path, find path variable edit in "System variable", add%catalina_home%\bin on the last side of "variable value", if the previous value is not, need to increment before adding;
(4) CLASSPath, find the variable edit in "System variables" and add%catalina_home%\lib\servlet-api.jar to the last face of "variable value"
? 3, click "Start"-"Run", type "cmd", enter the service install TOMCAT9 in the console, and display the services ' TOMCAT9 ' has been installed on behalf of the successful installation.
4. Turn on the service
Method 1: Control Panel-System and security-administrative tools-services, locate the Apache Tomcat Tomcat9 Service Item, right-click the entry, click "Start", start the service
Method 2: Enter the bin of the installation path, here is D:\Program Files (x86) \apache-tomcat-9.0.0.m26\bin, double-click Open Tomcat9w.exe, start
5. Test whether the installation was successful
Method 1: After starting, open the browser, address bar enter http://localhost:8080 or http://127.0.0.1:8080 if the Tomcat sample home page appears, the server installation is successful
Method 2: Run Startup.dat and Tomcat7.exe at the console (run-time to indicate absolute paths, Startup.dat and Tomcat7.exe in the bin directory) to test if the server is successfully installed
Other:
1. Close the service can also be run directly in the Bin directory in the Control Panel Shutdown.bat
2. If Tomcat cannot be started, it is possible that port 8080 is occupied and you can use Netstat-a to view the port situation.
If port 8080 is occupied, you can modify the Tomcat port to find the Server.xml file under the installation directory, D:\Program files (x86) \apache-tomcat-9.0.0.m26\conf\server.xml, Modify the port value and restart the service
<port= "8080" protocol= "http/1.1" connectiontimeout = "20000" redirectport= "8443"/>
Ii. installation and configuration of Eclipse
1. Download Eclipse Oxygen, Portal https://www.eclipse.org/downloads/eclipse-packages/
Download the Eclipse IDE for Java developers directly and unzip the Windows 64-bit version
Here is recommended to download the uncompressed version, this article first download the Eclipse installer installation, during the installation process error, ERROR:ORG.ECLIPSE.EQUINOX.P2.TRANSPORT.ECF code=1002 unable to read Repository at HTTP://DOWNLOAD.ECLIPSE.ORG/RELEASES/MARS/201506241002/CONTENT.XML.XZ. Try to update the download package, VPNFQ, turn off antivirus software, The default installation path is not installed properly.
After the decompression is complete, you can use it.
JAVA Latest Environment Build (JDK 1.8 + Tomcat 9 + Eclipse oxygen)