logo

Java - Overview

Key concepts of the ecosystem

The following concepts may confuse you.

Java vs JVM

  • Java is a language, defined by "The Java Language Specification"
  • JVM is the virtual machine that Java can be executed, defined by "The Java Virtual Machine Specification"

Note that

  • Java is not the only language that can run on top of JVM, other examples: Scala, Kotlin, Groovy, Closure, etc.
  • HotSpot is one JVM, implementing the JVM spec; there are other JVM implementations.

Both Java language and JVM specs can be found here: http://docs.oracle.com/javase/specs/

JVM vs JRE vs JDK

  • JVM: Java Virtual Machine. E.g. HotSpot.
  • JRE (Deprecated!!!): Java Runtime Environment
    • JRE = JVM + Library Classes
    • HotSpot written in C++ and Assembly, while libraries are written in Java
    • if you are just running Java programs, JRE is enough.
    • JRE is gone from Java 11, a much smaller runtime can be created by removing unnecessary modules as a result of Java 9 Modules and jlink.
  • JDK: Java Development Kit. E.g. Oracle JDK and OpenJDK
    • JDK = JRE + Development Tools (e.g. compiler)
    • if you are developing Java programs, JDK is required.

OpenJDK vs Oracle JDK

Java SE vs Java EE

  • SE = Standard Edition
  • EE = Enterprise Edition

Usually when we say Java we mean Java SE. Java EE added some extra packages to SE. There were some overlaps, but JEP 320 removed Java EE modules from Java SE in Java 11.

And you can ignore all other editions(like ME, Micro Edition), no longer relevant.

JEP vs JCP vs JSR

You may have seen JEP XXX or JSR XXX when reading about new Java features, for example, the module system that came with Java 9 can be found in JSR 376: Java Platform Module System or JEP 261: Module System.

  • JCP: Java Community Process. The process to make any changes to Java Language and API.
  • JSR: Java Specification Request. The formal document used by JCP, to describe the proposed changes.
  • JEP: JDK Enhancement Process. Not part of the community but Oracle. Used to describe the changes to OpenJDK. List of JEPs: http://openjdk.java.net/jeps/0

Release Cycle

A new version of Java is released every 6 months.

Current LTS versions: Java 8, Java 11, Java 17 (released in 2021)

Since Java 17, LTS release cycle changed to 2 years, next LTS version is Java 21, to be released in 2023.

The Future of Java

Other JVM languages:

  • Kotlin is fully supported by Google for Android development; it is also being used for backend.

Projects:

  • GraalVM: a Java VM implemented in Java.
  • Project Loom: bring fibers (lightweight threads) to Java.
  • Project Panama: a new way to call native code (an upgraded JNI).
  • Project Valhalla: 3 phases:
    • identity-free value objects first;
    • then primitive classes, migrating the existing primitives, and universal generics;
    • and finally specialized generics.
  • Project Amber: smaller, productivity-oriented Java language features. E.g. Sealed Classes, Records, Pattern Matching, Text Blocks, etc.