What is the Java Runtime Environment (JRE)?

12 October 2021

What is JRE?

The Java Runtime Environment, or JRE, is a software layer that runs on top of a computer’s operating system software and provides the class libraries and other resources that a specific Java program requires to run.

The JRE is one of three interrelated components for developing and running Java programs. The other two components are as follows:

  • The Java Development Kit, or JDK, is a set of tools for developing Java applications. Developers choose JDKs by Java version and by package or edition—Java Enterprise Edition (Java EE), Java Special Edition (Java SE) or Java Mobile Edition (Java ME). Every JDK always includes a compatible JRE because running a Java program is part of the process of developing a Java program.

  • The Java Virtual Machine, or JVM, runs live Java applications. Every JRE includes a default JRE, but developers can choose another that meets the specific resource needs of their applications.

The JRE combines Java code created by using the JDK with the necessary libraries required to run it on a JVM and then creates an instance of the JVM that runs the resulting program. JVMs are available for multiple operating systems, and programs created with the JRE run on all of them. In this way, the Java Runtime Environment is what enables a Java program to run in any operating system without modification.

You can download the JDK, including a compatible JRE, from Oracle.

Aerial view of highways

Keep your head in the cloud 


Get the weekly Think Newsletter for expert guidance on optimizing multicloud settings in the AI era.

How does JRE work?

The JDK and JRE interact with one another to create a sustainable runtime environment that enables the seamless execution of Java-based applications in virtually any operating system. These attributes make up the JRE runtime architecture:

ClassLoader

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

Bytecode verifier

The bytecode verifier ensures the format and accuracy of Java code before it passes to the interpreter. If code violates system integrity or access rights, the class will be considered corrupted and won't be loaded.

Interpreter

After the bytecode successfully loads, the Java interpreter creates an instance of the JVM that allows the Java program to be run natively on the underlying machine.

AI Academy

Achieving AI-readiness with hybrid cloud

Led by top IBM thought leaders, the curriculum is designed to help business leaders gain the knowledge needed to prioritize the AI investments that can drive growth.

What does JRE consist of?

Besides the Java virtual machine, JRE is composed of various other supporting software tools and features to get the most out of your Java applications.

Deployment solutions

Included as part of the JRE installation are deployment technologies like Java Web Start and Java plug-in that simplify the activation of applications and provide advanced support for future Java updates.

Development toolkits

The JRE also contains toolkits designed to help developers improve their user interface. Some of these toolkits include:

  • Java 2D: An Application Programming Interface (API) that is used for drawing two-dimensional graphics in the Java language. Developers can create rich user interfaces, special effects, games and animations.

  • Abstract Window Toolkit (AWT): A GUI (Graphical User Interface) that is used for creating objects, buttons, scroll bars and windows.

  • Swing: Another lightweight GUI that uses a rich set of widgets for offering flexible customizations.

Integration libraries

Java Runtime Environment provides several integration libraries to assist developers in creating seamless data connections between their applications and services. Some of these libraries include:

  • Java IDL (CORBA): Uses Common Object Request Architecture to support distributed objects written in Java programming language.

  • Java Database Connectivity (JDBC) API: Provides tools for developers to write applications with access to remote relationship databases, flat files and spreadsheets.

  • Java Naming and Directory Interface (JNDI): A programming interface and directory service that helps clients create portable applications that can fetch information from databases by using naming conventions.

Language and utility libraries

Included with the JRE are java.lang. and java.util. packages that are fundamental for the design of Java applications, package versioning, management and monitoring. Some of these packages include:

  • Collections Framework: A unified architecture that is made up of a collection of interfaces designed to improve the storage and process of application data.

  • Concurrency Utilities: A powerful framework package with high-performance threading utilities.

  • Preferences API: A lightweight, cross-platform persistent API that enables multiple users on the same computer to define their own group of application preferences.

  • Logging: A package that produces log reports—such as security failures, configuration errors and performance issues—for further analysis.

  • Java Archive (JAR): A platform-independent file format that enables multiple files to be bundled in JAR format, significantly improving download speed and reducing file size.
Related solutions
IBM Cloud

IBM Cloud is an enterprise cloud platform designed for regulated industries, providing open, AI-ready, secure and hybrid solutions.

Explore cloud solutions
IBM watsonx Code Assistant

Harness the power of AI-driven automation with watsonx Code Assistant to simplify coding across languages such as Python, Java and more.

Explore IBM watsonx Code Assistant
IBM Z developer tools

Discover a comprehensive suite of developer tools for IBM Z, ranging from AI and testing to cloud-native development and transaction processing.

Explore IBM Z development tools
Take the next step

Unlock the potential of DevOps to build, test and deploy secure cloud-native apps with continuous integration and delivery.

Explore DevOps solutions Learn about hybrid cloud for AI