Java Runtime Environment (JRE)
A free lesson from Swipe Coding · Java, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
Not everyone who uses Java wants to write their own code, too. Imagine you simply download a finished Java program to use it — for that, you don't need anything for compiling. That's what the "Java Runtime Environment", or JRE for short, is for.
The JRE contains the JVM along with the libraries needed to run Java programs — but no compiler. With the JRE you can execute finished bytecode (.class files), but you cannot compile your own source code.
java Main // works with the JRE — executes bytecode javac Main.java // does NOT work with the JRE alone — no compiler included
What is missing from the JRE (Java Runtime Environment) compared to the JDK?
You can think of the JRE like a DVD player: it can play finished movies, but it can't produce movies. The JDK, on the other hand, would be the entire film studio — including cameras, editing software, and the player to watch the final result.
With the JRE alone, you can compile your own Java source code into bytecode.
So if you only want to use Java software (for example, to start a program), the JRE is enough. If you want to develop your own Java programs, you need the full JDK — the JRE is automatically included with it, since without the JVM you couldn't even test your program.
The ____ contains the JVM and the libraries for running Java programs, but no compiler.
In summary, you now know the whole pipeline: you write source code (.java). The compiler from the JDK translates it into bytecode (.class). The JVM — included in both the JDK and the JRE — executes this bytecode. Developers install the JDK; people who just use Java software often only need the JRE.
How Java Works
10 questions · pass with 60% — just like in the app.
Human-readable Java text is stored in a file with the extension ____.
A processor can execute Java source code directly, without translating it.
What is the tool called that translates Java source code?
If the compiler finds an error in the source code, it still produces a runnable file.
The compiler translates source code into ____, stored in a .class file.
Bytecode is platform-independent and works with any matching JVM.
What does the JVM (Java Virtual Machine) do?
Developers install the ____ in order to write and compile Java programs.
What is NOT included in the JRE (Java Runtime Environment)?
The order of the Java pipeline is: write source code, translate it into bytecode with the compiler, execute it with the JVM.
Keep your streak going in Swipe Coding
Swipe through every level of Java on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →