2.1 JDK, JRE, and JVM relationships
To figure out the relationship between the JDK, JRE, and JVM, let's look at a perceptual understanding:
Jdk:java Development ToolKit (Java Development Kit). The JDK is the core of the entire Java, including the JRE, a bunch of Java tools (JAVAC/JAVA/JDB, etc.), and the Java-based class library.
Jre:java Runtime enviromental (Java Runtime Environment). That is what we call the Java platform, all Java programs must be under the JRE to run. Includes JVM and Java core class libraries and support files. It does not include development tools-compilers, debuggers, and other tools-compared to the JDK.
Jvm:java virtual mechinal (Java vm). JVM is a part of the JRE, it is a fictitious computer, the Java language is running across platforms, in fact, is a different operating system, using different JVM mapping rules, so that it is independent of the operating system, the completion of cross-platform.
As a general rule, the JDK contains jre,jre containing the JVM.
2.2 Building a Java environment
Since we are developing Java programs, building the Java environment is actually installing the JDK and configuring the environment variables.
2.2.1 Installing the JDK
1th step to download jdk on official website
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
If the computer is 32-bit, download windows x86, if the computer is 64-bit, download Windows x64.
2nd step, double-click the downloaded EXE file
Click "Next"
If you need to change the installation path, you can click "Change", if not changed, directly click "Next", the installation process, will let you choose to install Jer,
At this point, if you do not change the installation path of the JRE, simply click "Next"
See this page to indicate that it has been installed successfully.
2.2.2 Configuring environment variables
2nd step, click "Advanced System Settings"
3rd step, click on "Environment variables"
Create a new java_home, variable, configured as the installation path for the JDK just
Edit the path variable and add it inside
%java_home%\bin
Save OK
Verify that the environment variable is configured successfully, use the Windows key +r, open the Run window, enter the cmd command, click OK,
Then enter Java and press ENTER.
Description the configuration was successful.
This article reproduced: watch notes
https://www.swnote.com/n/dab460fe7ddf411087b750c71b2c0096
Java language Programming-building a Java development environment