- Summing up the running process of 1:Java
- JavaThe operation of a program is divided into two steps: first compile and then interpret.
- Compile the Java source program into Java bytecode file (.Class) through the “compiler” (bytecode file using structured neutral file format).
- The Java bytecode file is interpreted as a corresponding machine language and executed by different virtual machines.
- Summing up the difference between 2:Java cross platform and C cross platform
- Java：Once compiled, run everywhere, C: multiple compilation, running everywhere
Under the Internet environment, platforms have different platforms, and Java’s cross platform has more advantages.
JavaCan you cross all platforms? Do you have to provide and install the corresponding virtual machines?
JavaThe speed of running is no faster than C language
JavaThe class file needs to be interpreted as machine code execution and C execution machine code.
- Summary 3: bytecode file bytecode
.classFile binary file
A format neutral, platform independent binary file
It’s the product of the compilation, the raw material for the interpretation
Summing up the 4:Java virtual machine JVM
JVMIt is the abbreviation of Java Virtual Machine (Java virtual machine).
JVMIt is a specification for computing devices. It is a fictitious computer that is realized by simulating various computer functions on a real computer.
JVMIt is a virtual computer used to execute bytecodes bytecode.
JavaVirtual machine is the core technology of Java, and also the foundation of cross platform.
JavaThe language uses the Java virtual machine to shield the information related to the specific platform, making the Java language compiler only to generate the target code (bytecode) running on the Java virtual machine (bytecode), and can run without modification on a variety of platforms.
JavaWhen executing the bytecode, the virtual machine interpretes the byte code into the execution of machine instructions on the specific platform. This is why Java can compile and run everywhere.
- Summing up the difference between 5:JDK, JRE and JVM
Java Development Kit
Products for Java developers
Java Runtime Environment
It is the set of environments required to run the Java program
Java Virtual Machine
Explain the operation of Java bytecode file, the core of cross platform.
Contact: JDK contains JRE, and JRE contains JVM.