Scrivio Interview library
DesignIntermediate7 min read · updated 12 November 2026

Plan a Java 17 to 25 upgrade for 40 services owned by your group, with a deadline set by the end of commercial support for your current JDK build.

I would work backwards from the support deadline and upgrade frameworks first, moving Spring Boot and key libraries to versions that support Java 25, then use jdeps and OpenRewrite recipes to find and fix internal API use and deprecated code. With updated CI and base images ready, each service switches by changing its toolchain version, in waves that start with low-risk services and roll out through canaries. A dashboard tracks every service, blockers are handled centrally, and shared libraries compile with --release so consumers still on Java 17 keep working.

Why this question is asked

A deadline set by the end of commercial support is a hard date: after it, the JDK build we run gets no security fixes unless we pay for extended support. With 40 services, the risk is not that one upgrade is hard but that the last five are, and they are discovered in the final month. Interviewers ask this design question to see whether a candidate can plan the order of work, build shared tooling and keep a group on schedule. In this answer, we will set a timeline from the deadline, see why frameworks move first, use jdeps and OpenRewrite to find work early, provide shared images, plan the waves, track them on a dashboard and handle shared libraries with --release.

1Working Backwards From the Deadline

Suppose commercial support ends in nine months. We do not plan to finish in month nine; we plan to finish in month seven, leaving two months for the services that surprise us. That gives us roughly one month of preparation, one month of pilots and five months of waves, which means about eight services a month once the waves start.

Writing this down early matters because it turns a vague goal into a rate we can check. If by the end of month four only ten services are done, we know we are behind while there is still time to add help or change the order.

Step throughTimeline for 40 services
  1. Month 1: preparationinventory, images, recipes, dashboard
  2. Month 2: pilots3 low-risk services end to end
  3. Months 3-7: wavesabout 8 services a month, canary each
  4. Month 7: all on 25?
    YesyesNotwo months of buffer left
  5. Month 9: support endsold JDK builds removed from images

5 steps in order. Play them, or step through them one at a time.

2Why Frameworks and Libraries Move First

Most failures when changing the JDK come from frameworks and libraries, not from our own code. Spring Boot must be on a version that supports Java 25, which today means a recent 3.5 patch release or 4.0 (check your exact version's notes). Libraries that read or generate bytecode, such as Byte Buddy, Mockito, Lombok, JaCoCo, MapStruct and Java agents for monitoring, must understand Java 25 class files.

So step one for every service is to upgrade these while still running on Java 17. Each of those upgrades is releasable on its own, and it shrinks the JDK switch later to a small change. Where 40 services share a company BOM, a bill of materials that pins dependency versions, we update the BOM once and every service picks up compatible versions.

3Finding the Work Early With jdeps and OpenRewrite

jdeps is a tool shipped with the JDK that analyses class files and reports their dependencies. With the --jdk-internals option it lists every use of internal JDK APIs, such as sun.misc or com.sun classes, and suggests replacements. We run it on each service's jar and on its dependencies in month one, so we know which services have real problems before the waves start.

Properties
jdeps --jdk-internals --multi-release 25 --class-path 'target/lib/*' target/orders.jar
# orders.jar -> JDK removed internal API
# com.acme.util.Hex -> sun.misc.BASE64Encoder JDK internal API (JDK removed internal API)
# Suggested replacement: use java.util.Base64
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE \
-Drewrite.activeRecipes=org.openrewrite.java.migrate.UpgradeToJava25

OpenRewrite is an open-source refactoring tool that applies recipes, automated code changes, to source files. Its Java migration recipes update build files and replace deprecated APIs with their successors. Check which upgrade recipes exist in the version you use, since new ones are added for each LTS. The value is consistency: 40 services get the same change, reviewed once, instead of 40 hand-made variations.

4Shared CI and Base Images

The platform side of the group prepares the images before the waves start: a CI build image with JDK 25 and current Maven or Gradle versions, and a runtime base image such as one based on eclipse-temurin:25-jre with the company's certificates, user and JVM options. Both versions, 17 and 25, are available in parallel during the programme.

Then switching a service is a small change in its own repository: the toolchain version in the build file and the base image tag in the Dockerfile. Using build toolchains also means the CI agent's own JDK does not matter, because Maven or Gradle selects the JDK the project asks for. A small change is easy to review, easy to canary and easy to revert.

5Upgrading in Waves With Canaries

We order the services by risk. Low-risk services are small, well tested and not on the critical path, and the first wave uses them to prove the images, recipes and rollout steps. Medium-risk services follow, and the high-risk ones, those with agents, heavy reflection, native libraries or tight latency targets, go last but not at the very end, so there is time to solve their problems.

Each service rolls out with a canary: one instance on Java 25 beside the Java 17 instances, compared for latency, errors, heap and GC pauses over at least a day. Only then does the rest of the service move.

Wave plan
WaveServicesTypical traitsWhen
Pilot3small, good tests, internal usersMonth 2
Wave 112standard Spring Boot, no agentsMonths 3-4
Wave 215more integrations, some reflectionMonths 4-6
Wave 310agents, native libs, strict latencyMonths 5-7

6Tracking Status and Handling Blockers Centrally

A shared dashboard shows each service with its wave, its current step (libraries upgraded, toolchain switched, canary, done) and any blocker. It can be generated automatically by reading each repository's build file and deployed image tag, which keeps it honest without asking teams to update a spreadsheet.

Blockers that affect several services are handled by a small central group. The classic example is a library with no release that supports Java 25. One person investigates it once: perhaps a newer fork exists, perhaps the library works anyway, or perhaps we replace it. That answer is then applied to every service that uses the library, instead of each team getting stuck separately.

7Shared Libraries and the --release Flag

Some of our code is consumed by others, such as internal client libraries. If a library is compiled for Java 25, a service still on Java 17 cannot load it and fails with UnsupportedClassVersionError. During the programme, shared libraries must stay usable by both.

Java
// Build the shared library with JDK 25 but target Java 17
javac --release 17 -d out src/com/acme/client/*.java
// Class files are version 61 (Java 17) and only Java 17 APIs are allowed
// Maven equivalent
<maven.compiler.release>17</maven.compiler.release>

The --release flag tells javac to produce class files for an older version and to check that the code only uses APIs that exist in that version. It is safer than the old -source and -target pair, which did not check the API. Once every consumer is on Java 25, the libraries can raise their release level.

8Follow-up questions

What if a team cannot schedule its upgrade before the deadline?

I would first check whether the upgrade really needs the team, since many services only need the toolchain and image change that the central group can prepare as a pull request. If the team still cannot take it, the central group does the work with the team's review. Escalation to management is the last step, framed as a security risk with the date.

Would you buy extended support for the old JDK as a backup?

I would price it early, because it is the fallback if a few services slip. Often extended support can be bought for a small number of instances, which is cheaper than delaying everything. Knowing that option exists keeps the deadline from turning into rushed changes.

9Conclusion

In this answer, we planned a Java 17 to 25 upgrade for 40 services against a support deadline. We worked backwards to set a monthly rate, upgraded Spring Boot and bytecode-heavy libraries first, found internal API use with jdeps and fixed code with OpenRewrite recipes, and provided shared CI and base images so each switch is a small change. We rolled out in waves from low to high risk with canaries, tracked every service on a dashboard with central help for blockers, and kept shared libraries compatible with --release.

What to say in the interviewAbout 90 seconds aloud

Open with

I would plan backwards from the support end date, aiming to finish two months early so there is buffer for surprises. With 40 services that gives a concrete rate, for example eight a month, which I can check.

Then, if they want more

The first step for each service is upgrading frameworks while still on 17: Spring Boot to a version that supports Java 25 and libraries that work with bytecode, like Mockito, Lombok, JaCoCo and agents. If we have a company BOM, we do that once there.

In the first month I would run jdeps with --jdk-internals across all services to find internal API use, and use OpenRewrite migration recipes to apply the same fixes everywhere. The platform side prepares CI and runtime images for Java 25 in parallel with 17, so switching a service is just the toolchain version and the image tag.

Then we go in waves: a few low-risk pilots, then standard services, then the risky ones with agents or native code, each rolled out with a canary and compared on latency, errors and GC.

A dashboard generated from the repositories shows the status of every service, and a small central group handles shared blockers like a library with no compatible release. Shared libraries are compiled with --release 17 until every consumer has moved, so nobody breaks on class file versions.

About this answer

Last updated
12 November 2026
Versions it names
Java 25, Java 17
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Plan a Java 17 to 25 upgrade for 40 services owned by your group, with a deadline set by...": https://scrivio-interview-library.netlify.app/architecture/modernization/79cf14f890/