What is Java Runtime Environment?

 

Java Runtime Environment (JRE) is a set of Java platform tools for developing and running Java applications. JRE is part of the Java Development Kit (JDK) along with the Java Virtual Machine (JVM).

In this tutorial, you will learn about the JRE, the runtime environment for Java and we will see how to install it.

In its simplest form, a runtime environment is a piece of software that is designed to run other software. As a runtime environment for Java, the JRE contains the Java class libraries, the Java class loader, and the Java Virtual Machine (JVM).

 

JRE consists of the following components:

  1. Implementation technologies such as implementation, Java plugin and Java Web Start.

  2. User interface toolkits: AWT, Swing, Java 2D, Accessibility, Image I / O, Print Service, Sound, Drag and Drop (DnD), and input methods

  3. Integration libraries including interface definition language (IDL), Java database connectivity (JDBC), Java directory and naming interface (JNDI), remote method invocation (RMI), remote method invocation via Inter-Orb Internet Protocol (RMI-IIOP) and scripts.

  4. Other base libraries, including international support, input / output (I / O), extension mechanism, Beans, Java Management Extensions (JMX), Native Java Interface (JNI), Math, Networking, Override Mechanism, Security , Serialization and Java for XML Processing (XML JAXP).

  5. Lang and util base libraries, including lang and util, zip, Java Archive (JAR), instrument, reflection, collections, concurrency utilities, management, version control, registry, preferences API, reference objects, and regular expressions.

  6. Java Virtual Machine (JVM), comprising Server Virtual Machine and Java HotSpot Client.

In this system:

  1. The class loader is responsible for correctly loading the classes into the JVM and connecting them to the main Java class libraries.

  2. The Java JVM Virtual Machine is the program that executes the previously compiled Java code (bytecode)

java virtual machine

Ultimately, JRE acts as a layer on top of the operating system. To run any Java program, you need JRE.

The flow of the bytecode to be executed is as follows:

java run time

How to check if Java Runtime Environment (JRE) is installed on my computer

To check if Java Runtime Environment is installed on your computer follow these steps:

  1. Select Control Panel > Programs

  2. A screen will appear with all the installed programs in alphabetical order

  3. Check if the Java name appears in the list.

How to download and install Java Runtime Environment (JRE)

To develop or run Java applications, you must download and install the Java SE Development Kit.

In most cases, Java comes by default in the configuration of computers and JRE would also be included. If not, you can download and install Java JRE with a Path environment variable (with PATH Environment Variables). To do this, follow these steps:

  1. Download the latest version of Java SE on the Oracle page (Be careful, you must accept the license agreement!):

  2. oracle download page
  3. After downloading the file, you will have a downloaded executable file. Run that file and keep everything as default and keep clicking next and then install.

  4. At the end of the installation, JDK and JRE will be downloaded in the program's files folder.

  5. After completing the installation, you must configure the environment variables:

  6. Go to Control Panel -> System and Security -> System -> Advanced System Settings. The following dialog box will appear.

    java run time setting
  7. Click Environment Variables, go to system variables and double click Path.

  8. Now add the path of your bin file present in the JRE file to the Path variable.

  9. java path

The installation is finished!

And now you can start installing Solr Java.