To learn a language, there must be a corresponding program authoring tool and Compiler tool, then Java compilation we need to install the JDK on our computer. The JDK is not a compilation tool, but it includes a compilation tool and some package files, and so on, let's step through the JDK installation and environment configuration and what's in the JDK.
One, JDK installation
After the JDK download and click on the JDK.exe file to install the JDK, generally it is best to install it directly in the C drive (the first time you can change the file installation directory when the \program files deleted). Click Next Next, the second time you can change the file installation directory, this is to change the installation path of the JRE, this installation path can be configured on its own, in general we install it in C:\Java\jdk1.7.0_45 (this name corresponds to your own JDK name) under this directory, After that, wait for the installation to complete silently.
Second, the JDK environment variable configuration
After the JDK is installed, we need to enter the computer's advanced system settings inside the environment variable settings, the environment variable inside the path of the paths, path is also called the System external Command search path, that is, we have to execute the Java command to go down this path to look for, These commands are in the Bin directory under the installed JDK file, so let's add C:\Java\jdk1.7.0_45 to the path path, and the JRE is the runtime environment (Java runtime Environment) There is a virtual machine running Java (JVM) running the compiled program, you need to use the VM, so you need to C:\Java\jdk1.7.0_45\jre\bin this path is also configured in. Finally, there is a classpath in the environment variable, this is the class file running Java when the class file to find out where to look, generally we set it as the current directory, that is. ‘。
Third, the contents of the JDK
Bin: All commands that use Java (most of them are executables)
Demon/sample: Some examples of Java
Include: some c language programs stored (Java sometimes uses C)
Some of the package files required by Lib:java
JRE: Runtime environment with Java Virtual Machine in it
also : Java is able to run on a variety of operating systems thanks to the virtual machine
Java file--translation--Compiler--Java class file--translation--Virtual machine--"operating system
This means that the Java class file is translated into a program that is suitable for the current operating system, so no matter which operating system you write on, the Java files can be run on other operating systems.
The character encoding used in Java is Unicode encoded, each character is two bytes, Unicode encoding for each character in each language has a uniform and unique binary code, Unicode encoding can hold 1,114,112 characters
Java-based JDK