Java Runtime Environment
About Java Runtime Environment
Most Windows applications are distributed as compiled executables, native code that runs directly on the CPU. Java works differently. A Java application is distributed as bytecode, a kind of intermediate format that no CPU executes natively. The Java Runtime Environment is the layer that bridges that gap, the thing that takes a bytecode file and turns it into something your processor actually runs.
This is the answer to the question users usually want answered when they first encounter the Java Runtime Environment, why do I need to install this just to use one application? The application you want to run was written in Java, distributed in a Java-specific format (usually a .jar file), and cannot start without the runtime in place.
The runtime is not the application, it is the platform the application stands on. Once installed, the same runtime serves every Java application on your system.
What the runtime actually contains
The Java Runtime Environment is a package of three things that work together. The Java Virtual Machine is the core, the engine that loads bytecode and executes it. The class libraries are the prewritten functions every Java program assumes are available, the equivalent of the standard library in any programming language, covering things like file access, networking, graphical interfaces, math operations, and collections.
Supporting files round out the package, configuration data, certificates, fonts, and the small executable that you actually launch (java.exe or javaw.exe on Windows).
When you double-click a .jar file or launch an application that depends on the runtime, what happens behind the scenes is that the java executable reads the bytecode, hands it to the virtual machine, the virtual machine pulls in whichever class libraries the application asks for, and execution begins. The CPU never sees Java code in its original form. It sees machine code that the runtime generates on the fly.
JRE versus JDK versus JVM, the question that confuses everyone
The terms get used interchangeably in casual conversation and they should not be. The Java Virtual Machine (JVM) is the execution engine, the part that runs bytecode. The Java Runtime Environment (JRE) is the JVM plus the class libraries and the executables you actually launch, the complete package needed to run a Java application. The Java Development Kit (JDK) is the JRE plus the compiler, the debugger, and additional tools developers use to write Java applications.
For someone who just wants to run a Java application someone else wrote, the JRE is the relevant package. For someone learning Java in an IDE like BlueJ or writing their own programs from scratch, the JDK is what you actually want, because without the compiler you cannot produce a runnable program in the first place.
The distinction matters because users searching for a “Java install” sometimes end up with the wrong one, the JDK is larger and includes tools they will never use, the JRE is smaller and is what most non-developers actually need. A user who only wants to play TLauncher or browse documents in Apache OpenOffice does not need the development tools.
The JIT compiler, garbage collection, and why Java apps feel different
Two pieces of the runtime are worth understanding because they explain why Java applications behave the way they do. The Just-In-Time compiler is the part of the virtual machine that watches your application as it runs and converts the bytecode paths used most frequently into native machine code.
This is why a Java application can start slowly (the JIT has not yet identified the hot paths) and then accelerate once it warms up. Long-running Java applications like servers eventually run at speeds comparable to native code, short-lived ones never get to take advantage of the optimization.
Garbage collection is the second piece. Java does not require the programmer to manually free memory the way C or C++ does. Instead, the runtime tracks every object the application creates and periodically reclaims the memory used by objects nothing references anymore. This makes Java code easier to write correctly but introduces pauses when collection runs. On modern collectors the pauses are short and rare, on older ones or on poorly configured runtimes they can be noticeable, frame stutters in graphical applications or brief freezes during heavy workloads.
For Minecraft and other memory-intensive Java applications, the collector behavior is the main thing users tune. Allocating more heap (the memory pool the runtime manages) lets the collector run less frequently, which reduces pauses but uses more RAM. Tuning collector settings can produce dramatic differences in perceived performance.
Heap, memory, and the settings that matter for users
The runtime starts with a default heap size that is suitable for small applications and far too small for large ones. The default is usually around a quarter of system RAM, capped at some upper limit, and most Java applications that ship with their own launchers override this with explicit settings.
The flags that control this are -Xms (initial heap size) and -Xmx (maximum heap size). A Minecraft launcher passing -Xmx8G to the java executable is telling the runtime that the game can grow its memory pool up to eight gigabytes. The application itself does not decide this, the launcher does, and the runtime enforces the limit.
For users running heavy Java applications, the practical advice is that the default settings are often the wrong settings. A modpack that crashes with out-of-memory errors usually needs the heap bumped up.
A server-side Java application that pauses unpredictably might need a different garbage collector selected through additional flags. None of this is built into the runtime as a user interface, the flags live in command lines or launcher configuration files, and getting them right is part of using Java applications well.
Multiple versions, the cleanup problem, and tools like JavaRa
The runtime has been through many releases over the years, and many Java applications target specific versions. The result on a typical PC, especially one that has been running Java applications for a while, is that several runtime installations accumulate. Each takes disk space, each potentially has security issues that older versions never had patched, and the version path that any given application uses depends on system configuration.
The runtime installer does not automatically remove older versions when you install a newer one, which is why most systems end up with several. JavaRa handles cleanup, scanning the system for installed Java versions and removing the ones no longer needed. This is the kind of utility you do not need until you suddenly do, when a system has six runtime versions installed and you cannot remember which one any given application uses.
For users who occasionally need to inspect the contents of a .jar file, JD-GUI decompiles Java bytecode back into readable source. This is useful for debugging, security review, or understanding how a Java application works, and it complements the runtime in cases where you need to see what an application actually does rather than just run it.
The browser plugin era, which is over
Older versions of the runtime included a browser plugin that let Java applets run inside web pages. This was a major use case for many years and produced an enormous library of educational, business, and entertainment content embedded in webpages. Browsers have since removed support for the plugin architecture that Java applets relied on, and the runtime no longer ships a browser plugin in any meaningful sense.
The practical effect, anything that was a Java applet in a webpage no longer runs in any modern browser. The runtime still handles desktop Java applications normally, and the loss is limited to the browser-embedded case. Users encountering instructions to install Java for a webpage are usually reading outdated documentation, the page itself almost certainly does not work anymore regardless of what runtime is installed.
Distributions, OpenJDK, and the runtime ecosystem
The Java runtime exists in multiple distributions. The mainstream commercial distribution is the most familiar, but a parallel ecosystem of open-source builds is freely available and used by many production systems.
The bytecode format is standardized, so any conforming runtime can execute any conforming Java application, which is why Java applications work the same whether the runtime they run on came from a commercial vendor or an open-source build.
For most users this is invisible. The installer they downloaded, whatever its origin, produces a runtime that runs their Java applications. The distinction matters mostly for production server use, licensing considerations, or specialized features that only certain distributions ship. For desktop Java, picking any working runtime and not worrying about the distribution is usually the right approach.
Conclusion
The Java Runtime Environment is one of the more abstract things a typical user is ever asked to install, a piece of software that does nothing visible on its own but enables a large body of applications to exist on the system. Understanding it as the execution layer beneath Java applications rather than as an application itself changes how the install feels, what looks like adding bloat is actually adding capability that applications written in Java rely on directly.
For most users the right relationship with the runtime is to install it once for whatever Java application brought them here, keep it updated periodically through the application’s update mechanism or through a clean install of a newer version, and ignore it the rest of the time.
For users running heavy Java applications like modded Minecraft launchers or large desktop suites, the runtime moves from invisible infrastructure into something worth tuning, the heap settings, the garbage collector, the version selection all start to matter. The runtime is the same in both cases, the depth of involvement is what changes.
Pros & Cons
- Universal platform for running Java applications across many devices and platforms
- Just-in-time compilation produces native-speed execution after warm-up
- Automatic memory management reduces certain entire categories of programming errors
- Standard libraries cover most common application needs without third-party dependencies
- Multiple compatible distributions available, no single vendor required
- Startup is slower than native applications because the runtime must initialize before execution begins
- Default heap settings are wrong for many real-world applications, manual tuning often required
- Multiple runtime versions accumulate on a system over time, manual cleanup needed
- The browser plugin functionality is no longer supported, breaking older web-embedded content
- Native look-and-feel of Java desktop applications is often imperfect, the platform integration shows
- Java applications consume more memory than equivalent native applications due to runtime overhead
Frequently asked questions
The Java Runtime Environment runs compiled Java applications. The Java Development Kit includes the runtime plus a compiler, debugger, and additional tools developers use to create Java programs. If you only want to run existing Java applications, the runtime is what you need. If you want to write your own Java code, the development kit is the right package.
Applications written in Java are distributed as bytecode rather than as native machine code. The bytecode cannot execute directly on a processor, it needs the runtime to interpret it and translate it into native instructions at execution time. Without the runtime installed, the operating system has no way to launch a Java application.
The Java Virtual Machine is the execution engine inside the runtime, the part that actually loads bytecode and runs it. The runtime is the complete package, virtual machine plus the standard libraries and supporting files needed to launch and run a Java application. You cannot install the virtual machine separately from the rest of the runtime in normal use.
By default the runtime allocates a fraction of system RAM as the maximum heap size. Most Java applications override this default through command-line flags (-Xms for initial heap size and -Xmx for maximum). The application's own launcher usually sets these values, and changing them requires editing the launcher configuration rather than the runtime itself.
Yes. Multiple runtime versions can coexist on the same system, with each Java application using whichever version its launcher points to. This is common on systems that have been running Java applications for a while, and tools like JavaRa help remove unused older versions when accumulated installs become a problem.
Browsers have removed support for the plugin architecture that Java applets relied on. The browser-embedded use case is over, regardless of which runtime is installed. The runtime still handles desktop Java applications normally, only the in-browser applet functionality is gone.
The Just-In-Time compiler watches a running Java application and identifies the code paths executed most frequently. It then translates those paths into native machine code on the fly, so subsequent executions run at native speed rather than going through the bytecode interpretation layer. This is why Java applications often start slowly and speed up as they run.


(114 votes, average: 3.93 out of 5)