Installation and configuration of 1.JDK
The JDK installation process is similar to a general software installation, and the following are the main details of the settings required for environment variables after installation:
a) New java_home variable
After you create the variable, set the value to the JDK's installation path, for example: C:\jdk1.6
Note: This variable is mainly because many third-party software automatically looks for the Java_home variable in the system, and if not, it cannot be used, for example: Tomcat.
Also, when you create a new variable, you can use%java_home% directly without adding a long installation path when referencing the JDK path elsewhere.
b) Set the PATH variable
Add the Bin directory under the JDK installation path to the path variable, for example:%java_home%\bin
Note: This configuration is intended to make it possible for the system to directly invoke Java applications such as Javac.exe, Java.exe, etc. in this directory from anywhere
c) Setting the CLASSPATH variable
Add Sun's two feature-rich jar packages so that you can use the classes in your own Java programs, which are in the Lib directory for each of the two jar packages:
Tools.jar and Dt.jar. For example:.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;
Note: When setting this variable, it is especially preferable to first add the current path, which is the first one that the Java compiler will refer to in the current path search program.
Description
A) If you are simply executing the javac command in cmd mode, you can only find the/bin in the JDK installation directory in path
b) To use a container such as Tomcat, create a new java_home environment variable to point to the JDK installation directory
Detailed reference:http://zhidao.baidu.com/question/268601361.html
2.Tomcat and Apache
Tomcat: jsp/servlet container for executing jsp/servlet; not an application server because the Java EE API is not supported
Apache: Application Server , responsible for receiving HTTP requests only supports static Web pages, but dynamic Web pages are not supported (C implementation)
Client HTTP request---->apache received, forwarded Jsp/servlet request to Tomcat----->
Tomcat to process and process the backhaul Apache
The client receives a response <----Apache accepts the Tomcat return information and forwards it to the client <------
Note: 1) Tomcat is embedded in Apache as its jsp/servlet container
2) Tomcat makes up for the bug that Apache does not support dynamic Web pages, and Apache can respond to more
Installation and configuration of JDK