What Is Java? History, JVM, and the Ecosystem
In this tutorial, you will learn about What Is Java? History, JVM, and the Ecosystem. We cover key concepts, practical examples, and best practices to help you master this topic.
Java is a class-based, object-oriented programming language designed for platform independence through the Java Virtual Machine. Created by James Gosling at Sun Microsystems in 1995, Java was built around the principle of "Write Once, Run Anywhere" (WORA), meaning compiled Java code can run on any device that has a JVM without recompilation.
What You'll Learn
- The history and philosophy behind Java
- How the JVM enables cross-platform execution
- The difference between Java SE, Java EE, and Java ME
- Oracle JDK versus OpenJDK — which one to choose
Why It Matters
Understanding where Java came from and how its ecosystem is structured helps you make informed decisions about which tools, libraries, and runtimes to use. Java powers over 3 billion devices, runs on 90% of Fortune 500 companies' systems, and remains the top language for enterprise backends.
Real-World Use
Java is the backbone of Android development (though Kotlin is now preferred), the standard for large-scale enterprise applications (banking, insurance, e-commerce), and the primary language for Apache Hadoop, Apache Spark, and much of the big data ecosystem. The JVM also hosts other languages like Kotlin, Scala, Groovy, and Clojure.
A Brief History of Java
Java began as the "Green Project" at Sun Microsystems in 1991. James Gosling, Mike Sheridan, and Patrick Naughton aimed to create a language for digital consumer devices like set-top boxes. The original language was called Oak (after an oak tree outside Gosling's office), but it was renamed to Java in 1995 — inspired by Java coffee, which itself comes from the island of Java in Indonesia.
The first public release, Java 1.0, debuted in 1996 with the famous slogan "Write Once, Run Anywhere." The language gained rapid adoption because its applets brought interactivity to web browsers. Over the years, Java evolved through major versions:
- Java 2 (1998) introduced the Collections Framework and Swing GUI toolkit
- Java 5 (2004) added generics, enums, annotations, and autoboxing
- Java 8 (2014) was a landmark release with lambdas, streams, and the new Date/Time API
- Java 11 (2018) was the first Long-Term Support (LTS) release under the new six-month cadence
- Java 17 (2021) introduced sealed classes, pattern matching for switch, and records
- Java 21 (2023) brought virtual threads (Project Loom), record patterns, and string templates
The Java Virtual Machine (JVM)
The JVM is the heart of Java's platform independence. When you compile a .java file, the javac compiler produces .class files containing bytecode — an intermediate representation that is not native machine code. The JVM interprets or compiles this bytecode at runtime into the machine code of the underlying operating system and hardware.
How the JVM Works
Java Source (.java) --> javac compiler --> Bytecode (.class)
|
JVM (on any OS)
|
Native Machine Code
The JVM manages memory through garbage collection, provides security by running bytecode in a sandbox, and includes a just-in-time (JIT) compiler that identifies hot spots (frequently executed code) and compiles them to native code for performance.
JVM Languages
Because the JVM executes bytecode, any language that can compile to bytecode can run on the JVM. This gave rise to a vibrant ecosystem of JVM languages:
- Kotlin — modern, concise, officially supported for Android
- Scala — combines OOP with functional programming
- Groovy — scripting-friendly, used with Gradle and Grails
- Clojure — a Lisp dialect with immutable data structures
Java Editions
Java comes in three main editions, each targeting a different class of devices:
Java SE (Standard Edition)
Java SE is the core platform. It includes the JVM, the Java Language Specification, and the fundamental APIs — collections, streams, I/O, networking, security, and more. Every Java developer starts with SE. The java.base module in the module system is part of SE.
Java EE (Enterprise Edition, now Jakarta EE)
Java EE extends Java SE with APIs for enterprise development: servlets, JSP, EJB, JPA, JMS, and more. In 2017, Oracle transferred Java EE to the Eclipse Foundation, which renamed it Jakarta EE. Today, Jakarta EE drives modern enterprise Java alongside Spring Boot.
Java ME (Micro Edition)
Java ME is a subset of Java designed for resource-constrained devices like Embedded Systems, mobile phones (feature phones), and IoT devices. It is less commonly used today as Android (which uses a customized Java ME-derived VM) dominates mobile.
Java Card
An even smaller edition for smart cards and SIM cards — used in banking cards, SIM cards, and identification cards.
Oracle JDK vs OpenJDK
For many years, Oracle JDK was the official reference implementation, and OpenJDK was the open-source version. Since Java 11, Oracle JDK and OpenJDK are essentially identical in code, with only a few cosmetic differences:
| Aspect | Oracle JDK | OpenJDK |
|---|---|---|
| License | Oracle No-Fee Terms (free for dev/prod) | GPL v2 with Classpath Exception |
| Updates | Oracle provides updates for 5+ years per LTS | Community-maintained, various vendors |
| Extra tools | Includes Flight Recorder, Mission Control | Same features in most builds |
| Cost | Free for most use cases, paid support available | Always free |
Today, most developers use one of several OpenJDK builds:
- Eclipse Temurin (Adoptium) — the most popular, free, TCK-tested
- Amazon Corretto — Amazon's build, free, with long-term support
- Azul Zulu — free, with commercial support options
- Microsoft Build of OpenJDK — free, maintained by Microsoft
Common Mistakes
- Confusing the JVM with the Java compiler. The compiler (
javac) produces bytecode; the JVM runs it. They are separate tools. - Thinking Java is only for enterprise. Java is also used in Android, scientific computing, and embedded systems.
- Ignoring the difference between OpenJDK builds. Not all OpenJDK builds are identical — some include commercial features.
- Calling Java EE "Oracle Java EE." Java EE is now Jakarta EE under the Eclipse Foundation.
- Assuming Java runs everywhere without a JVM. WORA requires a JVM for each platform — you must install the JVM on the target device.
Practice Questions
1. What does WORA stand for and how does the JVM make it possible?
It stands for "Write Once, Run Anywhere." The JVM acts as an abstraction layer — compiled bytecode runs on any JVM implementation regardless of the underlying hardware and OS.
2. What is the difference between bytecode and machine code?
Bytecode is an intermediate representation produced by javac. It is platform-independent. Machine code is native to a specific CPU architecture and OS. The JVM translates bytecode to machine code at runtime.
3. Name three JVM languages other than Java.
Kotlin, Scala, and Clojure.
4. What changed with Java EE after Oracle transferred it?
It was renamed Jakarta EE and is now governed by the Eclipse Foundation under open-source governance.
5. Which OpenJDK build would you recommend for a production server?
Eclipse Temurin (Adoptium) is the most widely used free build with TCK certification and long-term support.
Challenge Question:
If Java source code is compiled to bytecode, and bytecode runs on the JVM, why do we need platform-specific JDK installations? The JDK includes platform-specific native libraries (like java.dll on Windows) and the JVM itself is a native executable for each platform. The bytecode is platform-independent, but the runtime environment must be compiled for each operating system and architecture.
FAQ
Mini Project
Write a one-page report (in a text file or markdown) comparing three different OpenJDK builds — Eclipse Temurin, Amazon Corretto, and Azul Zulu. For each build, note:
- Who maintains it
- License terms
- Update frequency
- Whether it includes the JavaFX libraries
Install one of them and run java -version to verify the installation. Also write a short script that prints all system properties using System.getProperties().forEach((k, v) -> System.out.println(k + " = " + v)); to explore the JVM environment.
What's Next
Now that you understand what Java is and how its ecosystem is structured, the next step is to get a working development environment. In Lesson 2, you will install Java on your operating system, set up environment variables, and compile your first program. After that, you will dive into the anatomy of a Java class and the nature of the JVM in detail.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro