Skip to content
Shrake DevTools
  • JSON FormatterData & Format
  • JSON ValidatorData & Format
  • JSON MinifierData & Format
  • JSON ↔ YAML ConverterData & Format
  • XML FormatterData & Format
  • Base64 Encoder / DecoderData & Format
  • URL Encoder / DecoderData & Format
  • JWT InspectorData & Format
↑ ↓ to navigate↵ to openEsc to close

Java Version Comparator

Runs locally in your browser. Your input is not uploaded.Free, no sign-up

Java 17

LTS
Released
Sep 2021
Class file version
61
Spring Boot
Supported by Spring Boot 3.x and 4.x. Virtual threads need Java 21.

Java 25

LTS
Released
Sep 2025
Class file version
69
Spring Boot
Supported by Spring Boot 3.x and 4.x; spring.threads.virtual.enabled=true turns on virtual threads.

34 changes from Java 17 to 25, 6 of them removals or breaking changes

Check the removed / breaking items before upgrading

They are the usual reasons an application compiles on Java 17 but fails on Java 25. Run jdeps --jdk-internals on your JARs to find uses of JDK internals.
  1. Java 18Mar 2022

    • APIs

      UTF-8 by default

      Files and streams default to UTF-8 on every OS, not the platform charset.

      JEP 400
    • Tools

      Simple web server

      jwebserver serves a directory over HTTP.

      JEP 408
    • Tools

      Code snippets in Javadoc

      {@snippet} for compilable examples.

      JEP 413
    • Removed / breaking

      Finalization deprecated for removal

      Use Cleaner or try-with-resources instead of finalize().

      JEP 421
  2. Java 21LTSSep 2023

    • APIs

      Virtual threads

      Executors.newVirtualThreadPerTaskExecutor(): millions of cheap threads for blocking I/O.

      JEP 444
    • Language

      Pattern matching for switch

      switch (shape) { case Circle c -> …; case Square s -> …; }

      JEP 441
    • Language

      Record patterns

      if (obj instanceof Point(int x, int y)) …

      JEP 440
    • APIs

      Sequenced collections

      getFirst(), getLast(), reversed() on List, Deque, LinkedHashSet and LinkedHashMap.

      JEP 431
    • JVM & GC

      Generational ZGC

      ZGC with generations for better throughput.

      JEP 439
    • APIs

      Key Encapsulation Mechanism API

      JEP 452
    • Removed / breaking

      Dynamic agent loading warns

      Agents attached at runtime print a warning; load them with -javaagent instead.

      JEP 451
  3. Java 22Mar 2024

    • Language

      Unnamed variables and patterns

      catch (Exception _) and case Point(var x, _).

      JEP 456
    • APIs

      Foreign Function & Memory API

      Call native code and manage off-heap memory without JNI.

      JEP 454
    • Tools

      Multi-file source programs

      java Main.java can use other source files.

      JEP 458
    • JVM & GC

      Region pinning for G1

      No more GC stalls during JNI critical regions.

      JEP 423
  4. Java 23Sep 2024

    • Tools

      Markdown documentation comments

      /// comments in Markdown.

      JEP 467
    • JVM & GC

      Generational mode by default for ZGC

      JEP 474
    • Removed / breaking

      sun.misc.Unsafe memory access deprecated for removal

      Libraries should move to VarHandle and the FFM API.

      JEP 471
  5. Java 24Mar 2025

    • APIs

      Stream gatherers

      Custom intermediate operations: stream.gather(Gatherers.windowFixed(3)).

      JEP 485
    • APIs

      Class-File API

      Read and write class files without ASM.

      JEP 484
    • JVM & GC

      Virtual threads no longer pin on synchronized

      synchronized blocks no longer tie a virtual thread to its carrier.

      JEP 491
    • JVM & GC

      Ahead-of-time class loading and linking

      Faster startup from a training run's cache.

      JEP 483
    • APIs

      Quantum-resistant cryptography

      ML-KEM and ML-DSA.

      JEP 496
    • Removed / breaking

      Security Manager permanently disabled

      Enabling it at startup or runtime fails.

      JEP 486
    • Removed / breaking

      Windows 32-bit x86 port removed

      JEP 479
  6. Java 25LTSSep 2025

    • Language

      Compact source files and instance main methods

      void main() { IO.println("Hello"); } in a file without a class.

      JEP 512
    • Language

      Module import declarations

      import module java.base; imports every package of a module.

      JEP 511
    • Language

      Flexible constructor bodies

      Statements before super(…), e.g. to validate arguments.

      JEP 513
    • APIs

      Scoped values

      Share immutable data with callees and child threads; the virtual-thread-friendly ThreadLocal.

      JEP 506
    • APIs

      Key Derivation Function API

      JEP 510
    • JVM & GC

      Compact object headers

      Smaller object headers (-XX:+UseCompactObjectHeaders) cut heap use.

      JEP 519
    • JVM & GC

      AOT method profiling and simpler AOT cache creation

      Faster warm-up from a training run.

      JEP 515
    • JVM & GC

      Generational Shenandoah

      Production-ready.

      JEP 521
    • Removed / breaking

      32-bit x86 port removed

      JEP 503

Compare Java 8, 11, 17, 21 and 25 features and changes.

How to use the Java Version Comparator

  1. Pick the Java version you run today and the one you're moving to, or click a common upgrade.
  2. Read the changes release by release. Filter by category, or show preview features too.
  3. Before upgrading, work through the Removed / breaking items: removed modules, stronger encapsulation and changed defaults.

What is an LTS release?

A new Java version ships every six months. Every two years one of them is a long-term support (LTS) release that vendors keep patching for years: Java 8, 11, 17, 21 and 25. Most teams move from one LTS to the next.

Frequently asked questions

What does "Unsupported class file major version 65" mean?

The class was compiled for a newer Java than the one running it (or than a tool such as an old Gradle or ASM supports). The class file version is the Java version plus 44, so 65 is Java 21. The Java Stack Trace Analyzer explains this and other errors.

What breaks most often when upgrading from Java 8?

JAXB and the other Java EE modules (removed in 11: add them as dependencies), libraries that use JDK internals (blocked since 16 and 17: upgrade them or add --add-opens) and old build plugins or bytecode tools that don't understand the new class file version.

Which features need --enable-preview?

Preview features must be switched on with --enable-preview both when compiling and when running, and can change in the next release. The list hides them by default; the release that made each one final lists it as usual.