Java Virtual Machine as the .class file

Relationship : Java language compiler generates after .class file is actually run on the JVM virtual machine files instead of .java files.

Java Virtual Machine

  1. Java Virtual Machine two features: platform-independent and language-independent, language-independent: .class file structure
  2. Java Virtual Machine is a virtual computer, and the real computer, like, have their own complete hardware system, such as processor, stack, registers, as well as the corresponding instruction set. The only real difference between the virtual machine and the computer is: virtual machine processors, memory stack is out of the virtual software, and real computer's processor, memory and true is present.

Java source code is first compiled into .class by the compiler (bytecode) file, and then read one line from the line .class file interpreted by the JVM, so Java language is interpreted. It is due to java for a variety of different operating systems have different JVM, so to achieve a cross-platform in the true sense.

Remarks:

Compiled languages include: C, C ++, Delphi, Pascal, Fortran
interpreted language, including: Java, Basic, javascript

 

Running essentially JVM Java program reads the byte code file (.class files) operated by the Java program API implementation is installed between the system and the underlying JRE, java code is essentially a write operation everywhere.

Guess you like

Origin www.cnblogs.com/benbencyb/p/11681399.html