First, download the main development tools
Www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
http://mirrors.ustc.edu.cn/eclipse/technology/epp/downloads/release/
https://notepad-plus-plus.org/
Second, the configuration of environment variables
The next installation is complete.
after installing the JDK, we will configure the Java locale variables. Right-click My Computer---Properties---advanced system settings---Select the Advanced tab---Click on the environment variable---in the system environment variable that tap new, fill in the content:java_home for the value: C:\Develop\Java\jdk1.8.0_ 121 (This is actually the path of the JDK installation)
Configuration classpath and configuration java_home are basically the same, creating a new environment variable, such as:
Classpath the corresponding values are:.; %java_home%\lib;%java_home%\lib\tools.jar
When you configure path, you do not need to create a new, in the environment variable, we find, and edit, at the top of the value plus:%java_home%\bin;%java_home%\jre\bin;
- Verify that the configuration is successful
Win key +r fast open cmd: Enter java-version and javac-version, if the corresponding version of information appears, the configuration is successful. Such as:
Expand Knowledge Points:
- The difference between JVM,JRE and JDK
The Jvm:java virtual machine (also known as the Java language interpreter), used to interpret the Java source code compiled bytecode file, the JVM is related to the platform.
Jre:java the operating environment, the JRE mainly includes the Java Virtual Machine (JVM) and the core class libraries required for the Java program to run. If you just want to run a Java-developed program, you just need to install the JRE.
Jdk:java Development Toolkit, JDK is improved for Java developers, including Java development tools, including the JRE, toolkit including compilation tools (Javac.exe) and packaging Tools (Jar.exe), etc.
- Why is the JRE included in the JDK?
1th: The development of Java programs, you need to test the program, run to see the effect, so these operations need to have the support of the JRE
2nd: The development tools in the JDK are actually developed in the Java language, packaged as. exe files for ease of use, and cannot be run without the JRE.
- What is the role of path paths?
When we execute Java programs, we use tools such as Java.exe and Javac.exe. While these tools are in the bin directory, the purpose of configuring path is to tell the system the path to these tools, which can then be invoked directly for use
- The role of the classpath path
Java program execution, without the class library, and the CLASSPATH path is to configure the path of these class files, so that when the program executes, quickly find.
- Considerations for CLASSPATH Configuration
The DOS window can set the temporary classpath path: Set classpath = Path, and the benefit is that executing the Java file anywhere without switching the drive letter will be successful. Because the JVM cannot find the Java source file, it will be based on the path of the temporary setting
Design environment configuration for Java programs