RFR: 8252689: Classes are loaded from jrt:/java.base even when CDS is used

Claes Redestad redestad at openjdk.java.net
Fri Sep 11 19:41:38 UTC 2020


On Fri, 11 Sep 2020 18:31:02 GMT, Yumin Qi <minqi at openjdk.org> wrote:

> Java.util.jar.Manifest related classes not archived since they are neither in classlist or loaded in dump process.
> Manually create a dummy Manifest object will cause those classes loaded in dump and archived.

I think you could achieve the same if you extend the
[HelloClasslist](https://github.com/openjdk/jdk/blob/master/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java)
tool built and used to generate the default classlist file to include a manifest in its jar file. Add a dummy
manifest.mf somewhere and edit the CLASSLIST_JAR target in
[GenerateLinkOptData](https://github.com/openjdk/jdk/blob/master/make/GenerateLinkOptData.gmk) to include it in the jar.

This would avoid hard-coding  this in hotspot code and keep the responsibility of curating the default classlist in one
place.

-------------

PR: https://git.openjdk.java.net/jdk/pull/134


More information about the hotspot-runtime-dev mailing list