Ace8 is the modernization practice of AceMQ.24/7 support from AceMQ after go-live
Book an Assessment

Java upgrade

Java upgrade: from Java 8 or 11 to Java 21.

What breaks, what a recipe can fix, and what needs a person. A guide for the developer and a plan for the manager.

The short answer

A Java upgrade moves your applications from Java 8 or 11 to a current long-term support release such as Java 21. Most of the effort is removed APIs, stricter module encapsulation and dependency updates. Ace8 runs OpenRewrite recipes for the bulk changes, tests the result and has an engineer review each diff.

Reasons

Why upgrade

  • Older runtimes stop receiving free security updates, and open CVEs pile up.
  • Current Spring versions need Java 17 or later, so the framework upgrade depends on it.
  • Libraries drop old Java versions every year. The longer you wait, the bigger the jump.
  • AI features, agents and modern tooling target current runtimes.

Breaking changes

What breaks

These are the classes of breakage we look for. Check each against the release notes of the exact versions you are crossing.

ChangeAppears fromSymptomUsual fix
Java EE modules removed from the JDK, including JAXB and JAX-WSJava 11Compile errors on javax.xml.bind and related importsAdd the dependency explicitly, or move to the Jakarta equivalent
Nashorn JavaScript engine removedJava 15Runtime failure where scripts use the engineReplace with another engine or rewrite the script step
Strong encapsulation of JDK internalsJava 17Illegal reflective access errorsUpgrade the library, or add targeted --add-opens flags as a stopgap
Library version floorsThroughoutOld library will not run on the new JDKBump the dependency and fix its API changes
Build tool and plugin versionsThroughoutCompiler or test plugin failsUpdate Maven or Gradle and plugins

Evidence

Recipe run on our sample repo

We run the OpenRewrite Java 21 upgrade recipe on an open-source Java 8, Spring Boot 2 and javax application. For each class of breaking change we will report how many occurrences the run found and fixed, and the test results before and after. The run is not published yet, so no numbers appear here. See OpenRewrite.

Beyond the code

Build, test and CI changes

A recipe changes source and build files. It does not change the environment around them.

  • CI images and build agents need the new JDK.
  • Container base images and runtime flags change.
  • Test frameworks and mocking libraries often need a version bump.
  • Static analysis and code coverage tools must support the new bytecode.
  • Monitoring agents must support the new runtime.

Route

Upgrade path: 8 to 11 to 17 to 21

You can jump straight to 21, but you then meet every change at once. Stepping through 11 and 17 isolates each group of failures, at the cost of more test cycles. We choose per application using its test coverage: well-tested code can jump, thinly tested code steps.

  1. 1

    Java 8 to 11

    Removed Java EE modules and early module-system effects.

  2. 2

    Java 11 to 17

    Strong encapsulation and library compatibility.

  3. 3

    Java 17 to 21

    Usually the smoothest step, once 17 is clean.

Cost

Effort factors

  • Test coverage, because missing tests mean slow and uncertain review.
  • Number of applications and shared libraries.
  • Age and number of third-party dependencies.
  • Use of reflection, bytecode tools and native code.
  • How far apart the source and target versions are.

If you cannot yet

If the upgrade must wait

Some teams cannot upgrade this quarter. OSSeva provides extended support for Java 8 and 11 so you can stay on the old runtime safely while you plan. It is a bridge. The plan still ends at a current release.

FAQ

Frequently asked.

Something else on your mind? Ask an engineer.

Java 21 is the current target we plan for, since it is a long-term support release. Java 17 is the minimum for Spring Boot 3. We confirm the right release for you in the assessment.

Know the cost before anything moves.

A fixed-price assessment gives you the inventory, the risk score and a phased plan. Scope and cost are fixed before the migration starts.

Book a Fixed-Price Assessment

Get in touch

Talk to a modernization engineer

Tell us what you run today. An engineer, not a sales script, replies within one business day.

305-204-2607info@ace8.io

66 W. Flagler St. 9th Floor
Miami, FL 33130

What are you moving off? *

Fixed price. Scope and cost before any migration starts.