Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 2.34 KB

Overview-of-Java-Specifications,-Implementations,-and-Instances.md

File metadata and controls

44 lines (32 loc) · 2.34 KB

Title:
Overview of Java Specifications, Implementations, and Instances

Article:

1. Specifications

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.

2. 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.

3. Key Components

  • 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.

4. Instances

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.

5. Java Files and Compilation

  • 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.

6. Key Principle: "Write Once, Run Anywhere"

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.

Back