Java Runtime Environment (JRE)

Java Runtime Environment (JRE)

JRE, or Java Runtime Environment, as the name suggests, is a software layer, which provides some class libraries, and some resources which are required for running a java program. The Java Runtime Environment comes along with the Java Development Kit when we download it into our systems. The JRE is required for us to run the byte-code on any platform.

Java Runtime Environment | JRE

The JRE consists of some elements like –

  • ClassLoader
  • Byte-code verifier
  • Interpreter

ClassLoader – The ClassLoader loads all the necessary classes to run a Java program. Since the classes are loaded into the memory when required, the JRE uses ClassLoaders to automate this process on demand.

Bytecode verifier – Before passing the bytecode to the interpreter, the bytecode verifier ensures the format and accuracy of the java code. If it violates any kind of system integrity or access rights, then the file is said to be corrupted and not loaded.

Interpreter – After the bytecode has successfully loaded, the interpreter creates an instance of the JVM, allowing the java code to natively execute on the required machine.

Other than the JVM, the JRE contains some other tools and software as well, like some necessary development toolkits, and some libraries.