Title:
Overview of Java Specifications, Implementations, and Instances
Article:
Java was initially developed by Sun Microsystems and later acquired by Oracle. The core of Java is defined by formal Specifications, which describe the required behaviour of the Java platform, including:
- Java Virtual Machine (JVM) Specification.
- Java Runtime Environment (JRE) Specification.
- Java Development Kit (JDK) Specification.
Specifications define how Java should work, ensuring compatibility across different implementations.
An Implementation is a working version of a Java Specification provided by a specific vendor. Examples include:
- Sun Microsystems (historical)
- Oracle JDK
- OpenJDK
- AdoptOpenJDK (now Eclipse Temurin)
Each implementation provides the necessary tools and libraries to run and develop Java applications, following the official specifications.
- JVM (Java Virtual Machine): Executes Java bytecode on a specific machine.
- JRE (Java Runtime Environment): Provides the libraries and environment needed to run Java applications (includes the JVM).
- JDK (Java Development Kit): A full development kit containing the JRE, compiler (
javac
), and other tools required to develop Java programs.
On a user’s machine, a Java Instance consists of:
- A specific Version (e.g., Java 8, Java 11, Java 17).
- A specific Implementation (e.g., Oracle JDK, OpenJDK).
Each installed instance runs according to its version and the vendor's implementation.
- Java source code is written in text files with the
.java
extension. - These files are compiled into bytecode (
.class
files), which are platform-independent. - Multiple bytecode files can be packaged into a JAR (Java Archive) file, which is a compressed archive of compiled classes and resources.
Java applications are compiled into platform-independent bytecode. The JVM interprets this bytecode on any operating system that has a compatible Java implementation, allowing the same compiled code to run without modification across different environments.