One: Install JDK (the recommended version is a newer JDK, because there are a lot of JDK versions that are required to integrate with JDK software):
JDK official website Download location: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
After the download is complete, install the JDK,
Note: The JDK and JRE locations in the installation cannot be selected in the same location, or the subsequent environment variable configuration will be faulted;
Last configuration Environment variables: Computer Right--Properties, advanced system design, environment variables
When open, create a new three variable in the system variable:
CLASSPATH:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar (Note that there is a point in the front, all in English format);
JAVA_HOME:G:\JAVASE\JDK\JDK (This is the location of your own JDK installation);
Find the variable in the "System variable" path: Add%java_home%\bin at the end, (if path has no semicolon; you add, then add%java_home%\bin;)
When you are finished, test your JDK environment variables for successful test methods:
In Doc, Windows (the key to the left of the Windows key) +r key, enter CMD,
After entering, enter
Javac-version (note that there are spaces between Javac and-version)
Then: java-version (note that there is a space between Java and-version)
Two to appear the version information, the first is to check the success of the compilation command, the second is to check the success of the execution of the command, there is an unsuccessful, that is, the JDK environment variable configuration is not successful, if the configuration is OK, but still javac-version and java-version have unsuccessful, That is to install the JDK installation directory with the installation directory of the JRE (in the JDK there will be two installation directories, first JDK, then the JRE, if you do not understand, do not change, keep the default line), causing the JRE in the JDK to be overwritten, the second only need to uninstall the reinstallation, Separate the JDK from the installation directory of the JRE, then configure the environment variables, and finally verify the configuration is successful under Doc
Such as:
Two: Install Eclipse:
Eclipse Download website address: http://www.eclipse.org/downloads/
Install directly after downloading;
Three: Install Tomcat
Tomcat and: http://tomcat.apache.org/
After selecting a version to install, such as I installed the latest tomcat8.0, the following 8.0 for example, after the entry to choose to download an offline package, as follows:
After the download is complete, install and then copy the installed address configuration environment variables, click Edit in Path, paste the installed address in the back;
Then, in the directory you installed, go to the Bin folder and click Startup.bat
The following results appear:
This is the first method that Tomcat successfully runs, the validation method:
Enter in the browser: http://localhost:8080/, if the page appears, then success;
The second method:
There are tomcat8.exe,tomcat8w.exe in the bin file,
In Doc, enter the address of pushd Tomcat to the bin file (for example, pushd G:\web\apache-tomcat-8.0.26\bin) as follows:
Then enter the service install (with spaces in the middle)
Note: My installation has been installed, so the installation failed to display, you should be successful installation;
Under the bin file, run Tomcat8.exe and open or close the service in Tomcat8w.exe;
In fact, we can see, Startup.bat and Tomcat8.exe is a thing, just start not installed services, so can not use, after the installation of doc, you can use, note, Tomcat8w.exe is only responsible for switching the service;
Four: Configure Tomcat in Eclipse:
Download the Tomcat plugin for Eclipse first,
: http://www.eclipsetotale.com/tomcatPlugin.html
When the download is complete, place it in the eclipse's Piug directory:
When you open eclipse, you will find three kitten icons, as shown below:
Note: If none of the three icons appear,
So choose ' Window>customize perspective...>commands ',
and tick ' Tomcat ' in ' Available command groups '
Next:
Open Window->preferences->serve->runtime Environments->add First,
Click Add:
Select 8.0, click Finish;
Next open the Window->preferences->tomcat and fill in the information on the right:
If your version has corresponding, then choose corresponding, my tomcat is 8.0, and this is only 7.0, so if there is no corresponding to choose the latest on the line;
Tomcat home is your tomcat's installation path
When finished, click OK;
Finally, the joy of the time to test: Click on the leftmost kitten, Tomcat started, print out the information in the console, open the browser, input http://localhost:8080/, and the above results are the same, indicating success;
About the configuration of Tomcat on eclipse