What is jre in java
Last updated: April 1, 2026
Key Facts
- JRE includes the Java Virtual Machine (JVM), which executes compiled Java code (.class files)
- JRE is free to download and install for Windows, macOS, and Linux operating systems
- The JRE is required to run Java applications but is not needed to develop Java programs (JDK is needed for development)
- JRE contains runtime libraries (rt.jar, tools.jar) that Java programs depend on to function
- Oracle releases new JRE versions twice yearly, with long-term support (LTS) versions available every 3 years
Definition and Components
The JRE (Java Runtime Environment) is a software distribution that enables computers to run Java applications and applets. It's the bare minimum required to execute Java programs without needing to develop them. The JRE includes three primary components: the Java Virtual Machine (JVM), core libraries, and other runtime tools necessary for Java program execution.
The Java Virtual Machine (JVM)
At the heart of the JRE is the Java Virtual Machine (JVM). The JVM is an abstract computing machine that enables a computer to run Java programs and programs written in other languages that compile to Java bytecode. Java's famous principle "Write Once, Run Anywhere" (WORA) is achieved through the JVM, which abstracts the underlying operating system and hardware. Each operating system has its own JVM implementation, allowing the same Java bytecode to run on Windows, macOS, Linux, and other platforms.
Core Libraries and APIs
The JRE includes a comprehensive set of runtime libraries containing classes and methods that Java applications use. These libraries provide functionality for file I/O, networking, databases, graphics, and much more. Key library components include java.lang (core language classes), java.util (utilities), java.io (input/output), and java.net (networking). Without these libraries, most Java programs would not function properly.
JRE vs JDK vs JVM
It's important to understand the distinctions between these related terms:
- JRE - Runtime environment for executing Java applications (end users)
- JDK (Java Development Kit) - Includes JRE plus tools for developing Java programs (developers)
- JVM - The virtual machine that executes Java bytecode (component of JRE)
Developers need the JDK to compile Java source code (.java files) into bytecode (.class files). End users only need the JRE to run these compiled programs.
Installation and Usage
JRE can be downloaded free from Oracle's website and installed on any computer. Once installed, users can run Java applications by double-clicking .jar files or using the command line with the java command. Different JRE versions support different Java language features, so some applications may require specific JRE versions to run properly.
Related Questions
What is the difference between JDK and JRE?
The JDK (Java Development Kit) is for developers and includes JRE plus compilation tools and development utilities. The JRE (Java Runtime Environment) is for end users and only runs compiled Java applications. Developers need the JDK; users only need the JRE.
What is the Java Virtual Machine (JVM)?
The JVM is an abstract computing machine that executes Java bytecode, enabling Java's "Write Once, Run Anywhere" capability. Each operating system has its own JVM implementation, allowing the same Java program to run on different platforms without modification.
Do I need to install JRE to run Java programs?
Yes, JRE is required to run Java applications on your computer. However, many applications bundle JRE with them, so you may not need to install it separately. You can check if JRE is installed by opening a terminal and typing 'java -version'.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Oracle - Java SE Runtime EnvironmentOracle BCLA
- Wikipedia - Java Programming LanguageCC-BY-SA-4.0