JDK and JRE Concepts
- Jdk:java Development Kit Java Development Kit. The JDK is available to Java developers and includes Java development tools, as well as the JRE
- Jre:java Runtime Environment Java Runtime environment. including Java virtual machines (JVM Java) and the core class libraries required by Java programs, if you want to run a well-developed Java program, you only need to install the JRE in your computer
Installing the JDK and JRE
Click jdk-8u151-windows-x64.exe (http://www.oracle.com/technetwork/java/javase download) to install the JDK
WINDOW10 Configuring environment variables
1. Click on this computer to open the system properties
2. Click Advanced System settings to eject the System Properties screen
3. Click on environment variable, popup environment variable interface; Click Path, enter at last; C:\Program files\java\jdk1.8.0_151
4. Inspection Javac Command
Command-line Compilation of Java files, file encoding must be UTF-8 Note: Only one class that is declared public in a source file requires that the class name and source file name of this class be consistent
Java Environment Setup and command-line compilation