Java 21 is the LTS most guides tell you to upgrade to. But plenty of teams are still on Java 17, and when they finally move, the sensible target is the next LTS, Java 25, skipping 21 entirely. That is a jump across eight releases, and the release notes for eight releases are not a reading list anyone wants.
This article does something simpler. It takes small programs compiled once for Java 17, runs them unchanged on Java 17 and Java 25, and shows what differs — what now fails, what silently changes, what merely warns. Then it shows how to have the JDK’s own tools find the same problems in your code. You need to know how to run a Java program; nothing more.
Versions and status. JDK 17.0.20.1 and JDK 25.0.4.1 (both Temurin), Maven 3.9, on a 2-CPU Linux machine. Java 25 is an LTS release. Spring Boot 4.1.1 for the framework rows. Everything below was run unless the text says it is a quotation from documentation. Companion code: javademos/migration-17-25.