Published 15 October 2018

Java Virtual Machine

The concept of a "Java virtual machine"

The concept of a "Java virtual machine"

Java Virtual Machine (abbreviated as Java VM, JVM) is a specification for software that executes code and provides a runtime for this code.

Java Virtual Machine - Java virtual machine is the main part of the Java runtime system, the so-called Java Runtime Environment (JRE).

What is JVM used for, the translation of Java code into bytecod

What is JVM used for, the translation of Java code into bytecode

The Java Virtual Machine (JVM) executes the Java bytecode, previously created from the Java source code by the Java compiler (javac).

The JVM has two main functions: launching Java programs on any device or operating system (known as the "Write once, run where" principle), and managing and optimizing memory.

The Java code is converted to a bytecode. This bytecode is interpreted on different machines. Between the host system and the Java source, the bytecode is the language of the mediator.

 

JVM architecture, specifications

JVM architecture, specifications

The architecture of the JVM consists of:

  • class loader (load, bind, and initialize)
  • a method area (stores class structures, such as metadata, a persistent runtime pool, and method code)
  • heap (memory is shared and shared between multiple threads)
  • stacks of languages ​​(storage of local variables, partial results)
  • PC registers (virtual machine instructions)
  • native method stacks (native code instruction)
  • execution mechanism (used to test hardware, software, or complete systems)
  • interface based on the method (calling libraries and own applications)
  • native method libraries (Native Libraries (C, C ++))

As a virtual machine, the JVM is an abstraction of the basic, real machine, such as the server on which the program runs. Regardless of which operating system or hardware is actually present, the JVM creates a predictable environment for programs that run inside. However, unlike a real virtual machine, JVM does not create a virtual operating system. The JVM is a managed runtime environment or virtual machine process.

Votes 0, average rating 0

Contents