Java Cup
Inside Java

News and views from members of the Java team at Oracle

JDK 28: jlink strip-debug Plugin Filters External Debug Symbols - Quality Outreach Heads-up

The OpenJDK Quality Group promotes the testing of FOSS projects with OpenJDK early-access builds as a way to improve the overall quality of the release. This heads-up is part of a Quality Outreach update sent to the projects involved. To learn more about the program and how to join, please check the Quality Outreach wiki page.

When linking modules that contain external native debug files, jlink --strip-debug previously copied those files into the generated runtime image. For example, .debuginfo and .diz files packaged in modules from a JDK built with --with-native-debug-symbols=external were retained, leaving debug information in the image despite the request to strip it. Input modules without external debug files, including release JDKs built with the default configuration, were unaffected.

As of JDK 28, strip-debug plugin also excludes external debug symbol files from the generated image:

Users who need to retain external debug files can replace --strip-debug with --strip-java-debug-attributes --strip-native-debug-symbols=exclude-debuginfo-files.

For more information, please check JDK-8387324.

~