jlink strip-debug: Keep Java Images Diagnosable
How should teams handle external native debug symbols when `jlink --strip-debug` changes in JDK 28? This practical guide frames the decision around runtime image contents, diagnosis, verification, security assumptions, operating cost, and rollback. It includes the documented selective `jlink` flags and a small release checklist without inventing benchmarks or incident outcomes.

Lead software engineer and technical consultant working across React, Next.js, TypeScript, Node.js, product delivery, and team leadership.
- jlink strip-debug
- java runtime images
- external debug symbols
- production diagnostics
- release engineering

On this page
- The jlink strip-debug decision for external symbols
- Smaller image versus diagnosable failure
- The concrete build choice
- Verify the artifact, not just the command
- Security and operating-cost considerations
- A rollback path for the packaging change
- The smallest reliable design
- Conclusion: make symbol handling an explicit release contract
- Official sources
A production Java runtime image has two competing jobs: contain only what the application needs, and remain useful when the application fails. The JDK 28 change to jlink --strip-debug makes that tension explicit for teams that package external native debug symbols.
The decision is narrow but operationally important: should the generated runtime image exclude those symbols, or should the build deliberately retain them? The answer depends less on a preference for small artifacts than on the failure path around the artifact. Who diagnoses a failure? Where are the symbols stored? What does the release process verify? Can the team reproduce the diagnostic context after rollback?
This is not a benchmark claim. The supplied material does not provide image-size measurements, startup results, or incident outcomes. It does provide a concrete change in jlink behavior and a documented alternative for teams that need to retain external debug files. That is enough to establish a packaging decision, not enough to claim a universal performance benefit.
The jlink strip-debug decision for external symbols
When linking modules that contain external native debug files, earlier jlink --strip-debug behavior could copy those files into the generated runtime image. The files included platform-specific formats such as .debuginfo and .diz on Linux and AIX, .dSYM bundles and .diz files on macOS, and .pdb, .map, and .diz files on Windows. The result was that a request to strip debug information did not necessarily remove external native symbol files from the image.
According to the JDK 28 Quality Outreach heads-up, JDK 28 changes this behavior: the strip-debug plugin also excludes those external debug symbol files from the generated image. The source also clarifies an important boundary: input modules without external debug files, including release JDKs built with the default configuration, were unaffected.
That boundary matters. “JDK 28 changes jlink” is too broad to guide a release process. The useful question is more specific:
Does this build consume modules that contain external native debug files, and does the team expect those files inside the generated runtime image?
If the answer to the first question is no, the described behavior is not relevant to that input. If the answer to both is yes, the build’s output and its diagnostic assumptions need review.
Smaller image versus diagnosable failure
A runtime image and a diagnostic archive are not automatically the same thing. The runtime image exists to run the service. Debug symbols exist to support investigation of certain failures. A team can decide that the production image should exclude external symbols while preserving a separate, controlled diagnostic path—but that policy has to be explicit.
This is an interpretation of the packaging change, not a claim that the source prescribes a particular deployment model. The supplied documentation establishes what jlink does with the files. It does not provide a complete incident-response process, storage policy, or security assessment for a particular organization.
A practical decision table looks like this:
| Question | If the answer is yes | Build implication |
|---|---|---|
| Do input modules contain external native debug files? | The JDK 28 behavior may change the image contents. | Inspect the generated image as part of the build. |
| Must those files be present in the runtime image? | The default --strip-debug behavior is no longer aligned with that requirement. | Use the documented alternative and verify the result. |
| Is diagnosis performed from a separate symbol store or artifact? | The runtime image can have a separate responsibility from diagnostic material. | Make retention, access, and artifact identity explicit. |
| Is there no requirement to retain external symbols in the image? | Excluding them is consistent with the described JDK 28 behavior. | Treat the smaller contents as an intentional policy, not an accidental side effect. |
The table separates verified behavior from team-specific assumptions. The JDK source supports the first column’s relationship to jlink; the operational implications are decision guidance.
The concrete build choice
The source gives a specific option for users who need to retain external debug files. Instead of using only:
jlink --strip-debug ...
use:
jlink --strip-java-debug-attributes \
--strip-native-debug-symbols=exclude-debuginfo-files \
...
The exact documented alternative is to replace --strip-debug with --strip-java-debug-attributes --strip-native-debug-symbols=exclude-debuginfo-files. The command above preserves that option while showing the two flags on separate lines for readability. The supplied source does not state that this command preserves every possible debug artifact, nor does it define the resulting image size. Do not infer either outcome without inspecting the build output and consulting the relevant JDK documentation for the target configuration.
The important design feature is explicitness. A build that says --strip-debug communicates one policy. A build that separately controls Java debug attributes and native symbol-file exclusion communicates a more selective policy. That distinction is valuable during review because the intent is visible in the command rather than hidden in an assumption about earlier tool behavior.
Verify the artifact, not just the command
A reliable packaging change needs checks at the artifact boundary. The source establishes the file categories affected by the JDK 28 change, so verification should be directed at those categories rather than at a generic belief that “debugging is disabled.”
A small release check can ask:
- Which JDK version executes the
jlinkbuild? - Which input modules contain external native debug files?
- Which platform-specific symbol-file types are relevant to the target image?
- Does the generated image contain the files the policy says it should contain?
- If symbols are excluded from the image, where is the corresponding diagnostic artifact retained?
- Can the team identify the exact runtime image and diagnostic material associated with a release?
- Has the failure-recovery procedure been updated to reflect the new image contents?
The first four questions concern build behavior. The remaining questions are operating assumptions that a team must answer for itself. The supplied sources do not confirm any particular artifact repository, retention period, access control, or incident workflow, so those details should be designed rather than assumed.
Security and operating-cost considerations
The source material does not provide a security analysis or cost model for retaining or excluding external symbols. It would therefore be irresponsible to claim that one choice is inherently more secure or cheaper.
There is still a useful decision lens. Ask where diagnostic material is allowed to exist, who can access it, how long it is retained, and whether the organization is willing to carry it in every runtime image. Those are policy questions, not measured outcomes from the supplied sources. They connect the packaging choice to security review and operating cost without pretending that the answer is universal.
The same discipline applies to runtime claims. The supplied excerpts contain no benchmark workload, image-size comparison, startup measurement, memory result, or failure-recovery experiment. Do not use the JDK 28 behavior as evidence for any of those outcomes. Measure them only if the workload and source are available, and state the assumptions.
A rollback path for the packaging change
Rollback should mean more than reverting a version number. For this decision, a useful rollback plan identifies the previous jlink invocation, the JDK version used to produce it, and the expected contents of the generated image.
Before changing a release pipeline, preserve a reviewable record of:
- the previous and proposed
jlinkoptions; - the input modules and whether they contain external native debug files;
- the expected treatment of
.debuginfo,.diz,.dSYM,.pdb, and.mapfiles for the target platform; - the verification result for the generated image;
- the location and identity of any separately retained diagnostic material;
- the condition that would trigger a return to the earlier packaging path.
This is not a claim that a rollback will solve every diagnostic problem. It is the smallest useful control for a build change whose effect is specifically about generated image contents. If the team cannot state what “back” means, it has not finished defining the change.
The smallest reliable design
For most teams, the smallest reliable design is not a complicated image-management system. It is a clearly stated policy with a build check and an explicit diagnostic path.
Start by determining whether the build actually uses modules with external native debug files. If it does not, the described JDK 28 change does not affect that input according to the supplied source. If it does, decide whether those files belong in the runtime image. If they do, use the documented selective flags rather than relying on the old interpretation of --strip-debug. If they do not, verify that the generated image excludes them and ensure that any required diagnostic material is handled separately.
That path keeps the decision proportionate. It does not introduce a broader architecture, claim a benchmark result, or treat a tool change as a release emergency. It makes one behavior visible, tests the artifact that matters, and preserves a route for diagnosis.
Conclusion: make symbol handling an explicit release contract
JDK 28 changes the meaning of jlink --strip-debug for external native debug symbols in generated runtime images. The practical consequence is not that every Java build needs redesigning. It is that affected builds should stop depending on an old assumption about what the flag leaves behind.
Treat symbol handling as a release contract: define the intended image contents, verify them, document where diagnostic material lives, and keep a rollback path. That gives platform owners, application teams, and incident responders a shared decision without turning a focused packaging change into architecture theatre.
If your Java delivery process needs a second set of eyes, I can help review the packaging decision, its verification points, and the operational assumptions around diagnosis and rollback.