A well-written Java program is not run directly in the system, but is run in a Java virtual machine. The Java Virtual machine is also known as the JVM (javavm), which is part of the Java Runtime Environment, also known as the JRE (Java Runtime Environment).
You can run Java programs as long as the JRE is installed on your computer.
First, the development of Java
- Java source code is a plain text file of *.java, which can be written in any text compiler, but cannot be executed.
- The JDK is a Java language development package that compiles the *.java file into an executable Java program.
- The executable Java program requires the JVM to run.
- The JRE contains the JVM.
- The JDK contains the JRE.
II. JRE and JDK
1. JRE
JRE (Java Runtime Environment,java Runtime Environment), a collection of environments necessary to run Java programs, including the JVM standard implementation and the Java Core Class library. Java can only be implemented to run, not the implementation of Java compilation, debugging and so on.
The JRE has a separate version, and if you only need to run Java programs, install the JRE.
2. JDK
The JDK (Java Development Kit) is the Java Language Software Development Kit (SDK).
The JDK includes the following basic components: compiler, jar packaging tool, Javadoc document generator, debug debugger, header file generator, disassembler, and monitoring tool.
The JDK contains the complete JRE. If the full JDK is installed, it is unnecessary to install the JRE.
Java Development and operation