1.JDK Download and Installation
The JDK (Java Development Kit) is a set of Java development tools that Java provides to us, which must run on the JVM (Java Virtual Machine), and the Java language's cross-platform is implemented with Java running on different platform versions of the JVM. For example, the JVM has Linux version, Windows version and Mac version, our written Java program can run on these three different operating systems without modification, that is, relying on these platforms corresponding JVM.
Java is currently the latest version is jdk-8u60, click on this link to download java8.0, the above and below is the difference between the following is the use of the API small sample.
The installation of the JDK is simple and the next step is to install the idiot. It is important to note that you do not need to choose the installation of the JRE, and remember to install your own directory (set environment variables to use).
The JRE is the environment in which the Java program runs, contains the JVM and some basic tools, and the JDK contains the JRE and some Java APIs. All when installing the JDK, you do not have to choose to install the JRE.
2. Configure Environment variables
Purpose: To make all programs in the Java Bin directory executable anywhere, configure Java_home environment variables to be used by other programs, such as Tomcat.
Right-click My Computer, advanced system settings, environment variables, create a new system variable named Java_home, and the variable value is the Java installation directory. Such as:
Next, edit the PATH environment variable in the system variable and add%java_home%\bin to the front (note that the semicolon is not missing).
-Temporary environment variable configuration (scoped to the current command line window):
Use the SET command to view, modify, delete, append environment variables
View: Set Path
Modified: Set Path=xxx
Delete: Set path=
Append: Set path=xxx;%path%
CLASSPATH environment variable: Use set classpath=xxx or set classpath=xxx; or set classpath=.; XXX New and set CLASSPATH environment variables.
The last semicolon, means to find the class file to be executed under the Classpath path, no, then look in the current directory; Where the decimal point represents the current directory.
Purpose: When introducing a third-party jar package, it is generally necessary to set the CLASSPATH environment variable, otherwise the class to be used cannot be found.
[Java Learning notes] Installation of JDK and configuration of environment variables