Java Environment

Java Run-time Environment (JRE) is part of the Java Development Kit (JDK). It has the following features –

  • JRE is an open-source, i.e., a freely available set of software tools for the development of Java applications.
  • It is required to run java byte code(it’s generated when Java code is compiled).
  • It acts as a layer on top of the operating system.
  • JRE combines the Java Virtual Machine(JVM), platform core classes, and supporting libraries.
  • Below are steps that take place during compile and run time –
    •  When one compiles a java program, the compiler generates a .class file that contains the byte-code.
    • Byte code is platform-independent and can run on any device that has JRE on it.
    • The class loader dynamically loads the classes in the Java Virtual Machine.
    • Byte code verifier checks for format and illegal code.
    • The interpreter reads the assembly code line by line, executes the byte code, makes calls to hardware.
  • To set up the PATH environment variable, follow the below steps –
    • Control panel -> System & Security -> System -> Advanced System Settings -> Environment variables
    • The path has two sections -> variable name and variable value.
    • If some path is given, go to the end, put a semicolon, and add the path otherwise, start with c:\