What Is Java? The Language, the Platform, and the JVM Explained
Java is a language, a huge standard library and a virtual machine that work together. Learn what JDK, JRE, JVM and bytecode mean, how a Java program actually runs, and which Java editions and versions exist today.
kvi5hnuCode Sprout team member15 min readOn this page
When people say "Java", they can mean three different things. One is a programming language: the keywords, syntax and rules you type. Another is a library of thousands of ready-made classes that come with every Java installation. The third is a runtime, the Java Virtual Machine (JVM), which actually executes your program. Java has stayed one of the most-used technologies in the world for three decades because these three pieces were designed together.
This first article gives you the map. By the end you will know:
- why Java is described as a platform, not just a language,
- what the JDK, JRE and JVM are, and which one you need,
- what bytecode is and what happens, step by step, between typing code and seeing output,
- which editions of Java exist (SE, Jakarta EE, ME, Card),
- where Java is used today and which version you should learn.
You do not need to install anything for this article. The next articles cover installation, compiling and running.
A Language Is Not Enough
Imagine two programming languages with equally pleasant syntax. Language A comes with almost nothing. You must write your own code (or hunt for third-party code) to open a network connection, read a date, sort a list or talk to a database. Language B ships with tested, documented, cross-platform code for all of those jobs. It also comes with an execution environment that cleans up unused memory for you, refuses to run obviously damaged code, and runs the same program on Windows, macOS and Linux.
Most teams will pick Language B, even if Language A is a bit more elegant. That is the core of Java's success. Java was never meant to be only a language. From its first release it was a platform:
| Part of the platform | What it gives you |
|---|---|
| The Java language | A readable syntax descended from C and C++, without their most error-prone features (pointer arithmetic, manual memory freeing, header files). |
| The Java class library (the Java API) | Thousands of classes for strings, collections, dates and times, files, networking, concurrency, security, databases, XML and more. |
| The Java Virtual Machine | The engine that loads, checks and runs compiled Java code, manages memory with a garbage collector, and makes it fast with a just-in-time (JIT) compiler. |
The library has grown from about 200 classes in Java 1.0 to more than 4,000 public classes and interfaces today. You will never memorise all of them, and you do not need to. Part of learning Java is learning which parts of the library matter for everyday work, and that is what this course focuses on.
How a Java Program Runs
In languages such as C and C++, the compiler translates your source code directly into machine code: instructions for one specific kind of processor (for example, x86-64) and one operating system. If you want the program on another platform, you compile it again for that platform, and often you also have to fix the differences between platforms.
Java takes a different route with two steps:
- Compile once. The Java compiler,
javac, translates your.javasource file into a.classfile. A class file does not contain machine code. It contains bytecode: compact instructions for an imaginary computer, the Java Virtual Machine. - Run anywhere. The
javalauncher starts a JVM. The JVM loads the bytecode, checks it, and executes it on whatever real hardware it is running on.

Let's follow a tiny program through that pipeline.
public class Solution {
public static void main(String[] args) {
int a = 6;
int b = 7;
System.out.println("6 x 7 = " + (a * b));
}
}
6 x 7 = 42
Don't worry about public static void main yet. It gets its own article. For now, focus on what happens to this file.
Step 1: javac produces bytecode
Running javac Solution.java creates Solution.class. The JDK includes a tool called javap that shows the bytecode inside a class file. Here is the real output for the main method above (javap -c Solution):
0: bipush 6 // push the constant 6
2: istore_1 // store it in local variable 1 (a)
3: bipush 7 // push the constant 7
5: istore_2 // store it in local variable 2 (b)
6: getstatic #7 // load System.out
9: iload_1 // push a
10: iload_2 // push b
11: imul // multiply the top two values
12: invokedynamic #13 // build the string "6 x 7 = 42"
17: invokevirtual #17 // call println(String)
20: return
Each line is one instruction for the virtual machine. The JVM is a stack machine: instructions push values onto an operand stack (bipush, iload), pop them to compute (imul multiplies the top two), and store results (istore). Notice that nothing here mentions Intel, ARM, Windows or Linux. That is the point. The same Solution.class runs on any machine that has a JVM.
Step 2: the JVM loads, verifies and executes
When you type java Solution, these things happen in order:
- Class loading. The JVM finds
Solution.class(and, later, every class it uses, such asStringandSystem) and loads it into memory. Classes are loaded lazily: only when first needed. - Verification. Before running any code, the bytecode verifier checks that the instructions are well formed and type-safe. For example, it checks that the code doesn't treat an integer as an object reference, doesn't jump into the middle of an instruction, and doesn't overflow the operand stack. A damaged or malicious class file is rejected here, before it can corrupt memory.
- Execution. At first, the JVM's interpreter executes the bytecode instruction by instruction. Meanwhile, the JVM counts how often each method and loop runs.
- Just-in-time compilation. When a piece of code becomes "hot" (it runs many times), the JIT compiler translates it into optimised native machine code for the current CPU. From then on, that code runs at full hardware speed.
- Garbage collection. As the program creates objects, the garbage collector finds objects the program can no longer reach and reclaims their memory automatically. You never call
freeordelete.
The most widely used JVM implementation is called HotSpot, named after this idea of finding and optimising the "hot spots" of a program. You'll learn more about the JIT in the next article.
JDK vs JRE vs JVM
Beginners often confuse these three terms. The picture below shows how they nest.

| Term | Stands for | What it is | Who needs it |
|---|---|---|---|
| JVM | Java Virtual Machine | The engine that executes bytecode: class loader, verifier, interpreter, JIT, garbage collector. | Built into every Java runtime; you never download it alone. |
| JRE | Java Runtime Environment | A JVM plus the standard class library: everything needed to run Java programs, but no compiler. | Historically, end users who only ran Java apps. |
| JDK | Java Development Kit | A full runtime plus development tools: javac, java, jshell, javadoc, jar, jdb, javap, jlink, jpackage and more. | You, as a programmer. |
The JVM is a specification, not one product
The words "Java Virtual Machine" refer to a specification: a document (the Java Virtual Machine Specification) that defines exactly what a JVM must do with each bytecode instruction. Likewise, the Java Language Specification (JLS) defines the language. Anyone can build an implementation:
- HotSpot, the JVM inside OpenJDK, used by almost every JDK distribution.
- OpenJ9, an alternative JVM from the Eclipse Foundation (originally IBM), tuned for low memory use.
- GraalVM, which adds an advanced JIT compiler written in Java and can also compile Java ahead of time into a standalone native image.
Because they all follow the same specifications, your class files run on any of them.
Many languages, one JVM
The JVM only understands bytecode; it doesn't care which language produced it. That is why other languages compile to JVM bytecode and can use every Java library:
| Language | Typical use |
|---|---|
| Kotlin | Android apps (Google's preferred Android language), server code |
| Scala | Data processing (Apache Spark), functional programming |
| Groovy | Build scripts (Gradle), scripting |
| Clojure | A Lisp dialect for functional programming |
Learning Java therefore also teaches you the platform that all these languages share.
OpenJDK and the Many JDK Vendors
Since 2007 the source code of Java has been open source under the GPL (with the "Classpath Exception", which lets you ship your own programs without making them GPL). The open-source project is called OpenJDK, and new Java features are developed there.
Several organisations build, test and distribute OpenJDK under their own names. The code is essentially the same; the differences are licensing, support length and extra tooling.
| Distribution | Provider | Notes |
|---|---|---|
| Eclipse Temurin | Eclipse Foundation (Adoptium) | Free, widely used, a good default for learning |
| Oracle JDK / Oracle OpenJDK builds | Oracle | Oracle JDK is free to use for recent versions under Oracle's own license terms; jdk.java.net builds are GPL |
| Amazon Corretto | Amazon | Free, used inside AWS |
| Azul Zulu | Azul | Free builds plus paid support |
| Microsoft Build of OpenJDK | Microsoft | Free, used across Azure |
| Red Hat build of OpenJDK | Red Hat | Bundled with Red Hat Enterprise Linux |
As a learner, the brand does not matter: a Java 25 JDK from any of these behaves the same way. The installation article in this course walks through one of them.
Java Editions: SE, Jakarta EE, ME and Card
Java has been packaged in several editions for different kinds of devices and programs.
| Edition | What it is | Status today |
|---|---|---|
| Java SE (Standard Edition) | The core language, JVM and standard library. Desktop, server and command-line programs. | What this course teaches. Everything else builds on it. |
| Jakarta EE (formerly Java EE / J2EE) | Specifications for enterprise server software: web servlets, REST services, dependency injection, persistence (JPA), messaging. | Moved from Oracle to the Eclipse Foundation in 2017–2019 and renamed Jakarta EE. Frameworks such as Spring Boot build on parts of it. |
| Java ME (Micro Edition) | A reduced Java for small devices such as feature phones and embedded systems. | Rarely used in new projects. |
| Java Card | A tiny Java for smart cards: SIM cards, bank cards, passports. | Still runs on billions of cards. |
Where Java Is Used Today
Java programs rarely run inside web pages any more (that era, called applets, is covered in the history article). Today Java is mostly found here:
- Back-end and web services. Banking, e-commerce, insurance, airline, telecom and government systems, often built with Spring Boot, Quarkus, Micronaut or Jakarta EE.
- Big data and streaming. Apache Kafka, Hadoop, Spark (Scala and Java), Flink, Cassandra and Elasticsearch run on the JVM.
- Android. The language and libraries carry over, as described above.
- Developer tools. IntelliJ IDEA, Eclipse, Gradle and Maven are written for the JVM.
- Cloud and microservices. Small JVM services in containers, increasingly started quickly with ahead-of-time compilation or GraalVM native images.
- Scientific, financial and trading systems where a mix of performance and safety is needed.
- Embedded and smart cards via Java Card.
Which Version Should You Learn?
A new Java version ships every six months (March and September). Every two years one of them is a long-term support (LTS) release, which vendors maintain with security fixes for many years. As of November 2026:
| Version | Released | Type |
|---|---|---|
| Java 17 | Sep 2021 | LTS (still very common in industry) |
| Java 21 | Sep 2023 | LTS (virtual threads, pattern matching for switch, record patterns) |
| Java 25 | Sep 2025 | Latest LTS: compact source files and instance main methods, flexible constructor bodies, module import declarations, scoped values |
| Java 26 | Mar 2026 | Feature release (HTTP/3 client, Applet API removed) |
| Java 27 | Sep 2026 | Newest release (G1 the default garbage collector everywhere, compact object headers by default) |
Recommendation: install Java 25 (LTS), or newer. Everything in this course works on Java 21 and later. Where a feature arrived after Java 21, the article says so. Code written for an older LTS such as 17 or 21 almost always runs unchanged on newer versions.
Common questions
Do I need to install a JRE as well as a JDK?
No. A JDK already includes a complete runtime, so it can both compile and run programs. Separate JRE downloads are mostly gone for desktop users. Applications that ship to end users now usually bundle a trimmed runtime made with jlink.
Is bytecode the same as machine code?
No. Bytecode is a set of instructions for the JVM, not for a real CPU, and the same .class file works on x86-64, ARM, Windows, macOS and Linux. The JVM turns it into machine code while the program runs, first by interpreting it and then by JIT-compiling the hot parts.
Does "write once, run anywhere" mean I never need to test on other platforms?
Mostly, but not completely. The language, bytecode and core library behave the same everywhere. File paths, line separators, available fonts, file-system case sensitivity and native libraries still differ. Use APIs such as Path.of(...) and System.lineSeparator() instead of hard-coding platform details, and portability problems become rare.
Which JDK vendor should I pick? For learning, any OpenJDK build works, and they all behave the same: Temurin, Corretto, Microsoft, Zulu, Oracle's jdk.java.net builds, and others. In a company, choose based on support length and licence terms. Eclipse Temurin is a safe free default.
Is Kotlin replacing Java? Kotlin is popular, especially on Android, but it runs on the same JVM and uses the same libraries. Knowing Java makes Kotlin easier to learn, and most server-side JVM code is still written in Java. The platform knowledge in this course carries over to every JVM language.
Summary
- Java is a platform: a language, a very large standard library, and a virtual machine that executes code safely and fast.
javaccompiles.javasource into.classfiles containing bytecode, instructions for the JVM rather than for a specific CPU.- The JVM loads classes on demand, verifies bytecode for safety, interprets it, JIT-compiles hot code into native machine code, and garbage-collects unused objects.
- The JDK = runtime + development tools; the runtime/JRE = JVM + class library. As a developer, install a JDK.
- OpenJDK is the open-source reference implementation; Temurin, Corretto, Zulu, Oracle JDK and others are builds of it.
- Java SE is the core edition and the subject of this course. Jakarta EE (enterprise), ME (micro) and Java Card build on or derive from it.
- Learn on the current LTS (Java 25) or newer.
Practice Questions
What is the difference between Java source code and bytecode?
Source code (.java) is the human-readable text you write in the Java language. Bytecode (.class) is what javac produces from it: compact instructions for the Java Virtual Machine. Bytecode isn't tied to any CPU or operating system, which is why the same class file runs on Windows, macOS and Linux.
A friend wants to run a Java program you wrote but never write code. Does the friend need the JDK?
Strictly, no: running needs only a Java runtime (JVM + class library), not the compiler. In practice, modern applications usually bundle their own runtime (built with jlink or packaged with jpackage), so your friend may need nothing extra at all. Developers install the full JDK.
Why does the JVM verify bytecode before running it?
A class file could be corrupted, produced by a buggy tool, or deliberately crafted to attack the machine. The verifier checks that instructions are well formed and type-safe: no treating numbers as object references, no jumping into the middle of an instruction, no stack overflow or underflow. Because those checks happen before execution, a bad class file is rejected instead of corrupting memory.
If Java is first interpreted, how can it be as fast as C++?
The interpreter is only the starting point. The JVM watches which methods and loops run most often and hands those to the JIT compiler, which turns them into optimised native machine code. Because the JIT compiles while the program runs, it can use real runtime information (which classes are loaded, which branches are taken) that a traditional ahead-of-time compiler doesn't have.
Is Kotlin code "Java"? Can a Kotlin program use Java libraries?
Kotlin is a different language with its own syntax, but its compiler produces JVM bytecode (or, on Android, code for ART). Since the JVM only cares about bytecode, Kotlin code can call Java libraries directly, and Java code can call Kotlin classes.
Which Java edition does this course teach, and why does that also help with Spring Boot or Android?
Java SE. Spring Boot and Jakarta EE are libraries and frameworks written on top of Java SE, and Android uses the Java language and much of the SE library. Everything you learn here (syntax, classes, inheritance, interfaces, generics, collections, exceptions, concurrency) is the foundation those technologies assume you already know.
Next: Java's Design Goals: The 11 White Paper Buzzwords Explained
Related reading

More in Core Java I
Java volatile, Atomics, Deadlocks and ThreadLocal: Safe Sharing Between Threads
Share data between Java threads without bugs: memory visibility and volatile, final fields, AtomicInteger and compareAndSet, LongAdder, lazy holder initialization, safe publication, lock-ordering deadlocks, ThreadLocal, InheritableThreadLocal and ScopedValue.
Java Condition Objects and the synchronized Keyword: await, signalAll, wait and notify
Make threads wait for a condition safely with Condition.await and signalAll, then learn Java's built-in alternative: synchronized methods and blocks, intrinsic locks, wait and notifyAll, choosing lock objects, client-side locking, and the monitor concept.
Java Race Conditions and ReentrantLock: Synchronizing Shared Data
Why unsynchronized threads corrupt shared data, shown step by step with a lost-update race, and how to fix it with ReentrantLock: the lock/try/finally idiom, critical sections, reentrancy and hold counts, tryLock, fair locks, and the mistakes that cause bugs.
Java invokeAll, invokeAny and Fork-Join: Running Groups of Tasks
Coordinate many concurrent tasks in Java: invokeAll to wait for every result, invokeAny to take the first success, timeouts, ExecutorCompletionService for results in completion order, structured concurrency, and the fork-join framework with RecursiveTask, RecursiveAction and work stealing.
Discussion
Sign in to ask a question or share what you learned.