Menu
Coddy logo textTech

What Is a Runtime Environment?

A runtime environment is the software a program needs around it while it runs: the engine that executes its code, the standard libraries it calls, and the services that manage memory, errors and access to the operating system. The JVM, Node.js and CPython are examples.

By Kevin Spektor, Co-founder & CTO

Updated September 24, 2026

Run console.log(typeof process) in Node.js and it prints object. Paste the same line into the console of Chrome and it prints undefined. The language is the same JavaScript in both places, but the program is running inside two different runtime environments, and each one gives it different tools.

console.log(typeof process);  // "object" in Node.js, "undefined" in a browser
console.log(typeof document); // "undefined" in Node.js, "object" in a browser

What a runtime environment provides

Your code only describes what to do. When it runs, it leans on a layer of software that was installed before you wrote a line. That layer usually has five parts:

  1. An execution engine. Something has to run the code: an interpreter, a virtual machine, or a just-in-time compiler. CPython, the Java Virtual Machine (JVM) and V8 are execution engines.
  2. A standard library. Ready-made functions for text, math, dates, files and networking, such as Python's json module or Java's java.util package.
  3. Memory management. The runtime allocates memory for your objects and, in Python, Java and JavaScript, frees it again with a garbage collector when nothing uses it.
  4. Error handling. When something goes wrong, the runtime stops the program in a controlled way and reports where, as a traceback or stack trace.
  5. Access to the operating system. Reading files, opening network connections, reading environment variables and command-line arguments all go through the runtime, which asks the operating system on your program's behalf.

You can ask the Python runtime about itself:

The answers depend on where the code runs. On a Linux server platform.system() returns 'Linux', on a Mac 'Darwin', and on Windows 'Windows'. The recursion limit (1000 by default in CPython) is a rule set by the runtime, not by the Python language, and the dozens of modules already loaded before your first line are the runtime preparing itself.

Java: JDK vs JRE vs JVM

Java makes the layers visible because each one has its own name:

NameStands forWhat it containsWho needs it
JVMJava Virtual MachineThe engine that runs bytecode (.class files) and manages memoryPart of both below
JREJava Runtime EnvironmentThe JVM plus the standard class librariesPeople who only run Java programs
JDKJava Development KitThe JRE plus developer tools: javac, jar, javadoc, jdbPeople who write Java programs

The flow is: javac Main.java (a JDK tool, the compiler) turns source code into Main.class, and java Main starts the JVM, which loads the class and runs it with the libraries of the runtime environment. The JVM is the reason one .class file runs on Windows, macOS and Linux: each operating system has its own JVM, and they all understand the same bytecode.

Since Java 11, Oracle ships only the JDK and no separate JRE download. Some distributions, such as Eclipse Temurin, still publish a JRE package. If you are learning Java, install a JDK: it contains everything the JRE does. The install Java guide walks through it.

JavaScript: the browser and Node.js

JavaScript was designed to run inside web pages, so its first runtime environment was the browser. A browser runtime gives your code the document of the page, window, timers, and fetch for network requests, and it deliberately blocks direct access to your files.

Node.js takes Google's V8 engine out of the browser and wraps it in a different runtime: no document, but modules such as fs for files, http for servers, and the process object for environment variables and arguments. Deno and Bun are newer runtimes for the same language with their own tools. All of them run the same core JavaScript; the difference is what surrounds it. The Node.js runtime and event loop pages go further.

Python: CPython and friends

When people say "install Python" they mean install a runtime environment: the CPython interpreter, the standard library, and pip for adding packages. Other runtimes exist for the same language. PyPy adds a JIT compiler for speed, and MicroPython is small enough to run on microcontrollers.

A virtual environment (python3 -m venv .venv) is not a new runtime. It points at an existing interpreter and gives one project its own set of installed packages, so two projects can use different versions of the same library. See virtual environments.

Compile time and run time

"Runtime" also names a moment: the period while the program is running, as opposed to compile time, when the source is being translated. A mistake the compiler rejects is a compile-time error; one that only appears while the program runs, such as dividing by zero, is a runtime error. The runtime environment is the software present during that second period.

Even C, which compiles straight to machine code, has a small runtime. A C program starts in startup code supplied by the compiler toolchain, and functions such as printf and malloc come from the C standard library (glibc on most Linux systems, the Universal C Runtime on Windows). There is simply no virtual machine and no garbage collector.

Common misconceptions

  • "The runtime environment is the operating system." The operating system manages the hardware for every program. The runtime environment is one program's layer on top of it. The JVM is itself a program that Windows, macOS or Linux runs; it does not replace them.
  • "Node.js is a language or a framework." Node.js is a runtime environment for JavaScript. Frameworks such as Express are libraries that run inside it.
  • "Installing an IDE installs the runtime." VS Code does not include Python or Java. The editor and the runtime environment are separate installs, although some IDEs, such as IntelliJ IDEA, can download a JDK for you.
  • "Same language, same behavior everywhere." Features the runtime provides, such as file access, default limits and available modules, can differ. Code that runs in Node.js can fail in a browser for exactly that reason.

Where to go next

The execution engine inside most runtimes is an interpreter, and that page also compares it with a compiler. Underneath every runtime sits the operating system. To practice in a runtime you have not used yet, start the Java course or the JavaScript course.

Frequently Asked Questions

Can you give me an example of a runtime environment?
The Java Runtime Environment (JRE) is the classic example: the JVM plus Java's standard libraries. Node.js is a runtime environment for JavaScript outside the browser, and the browser itself is another. For Python, the CPython interpreter with its standard library is the runtime.
Is Node.js a runtime environment?
Yes. Node.js is a JavaScript runtime environment built on Google's V8 engine. It lets JavaScript run outside a browser and adds modules for files, networking and processes. It is not a programming language and not a framework; frameworks such as Express run inside it.
What does runtime actually mean?
"Runtime" has two meanings. It is the period while a program is running, as opposed to compile time, which is why errors that appear only then are called runtime errors. It is also short for runtime environment, the software that supports a program during that period.
Should I install the JRE or the JDK?
Install the JDK if you write Java, because it includes the compiler javac and everything in the JRE. The JRE alone only runs existing Java programs. Since Java 11, Oracle distributes only the JDK, so for current Java versions the JDK is the normal choice.
What do JDK, JRE and JVM stand for?
JDK stands for Java Development Kit, JRE for Java Runtime Environment and JVM for Java Virtual Machine. The JVM runs bytecode, the JRE is the JVM plus the standard libraries, and the JDK is the JRE plus development tools such as javac.
Coddy programming languages illustration

Learn to code with Coddy

GET STARTED