On 1/16/26 12:58 PM, David Holmes wrote:
On Fri, 16 Jan 2026 20:20:56 GMT, David Holmes <[email protected]> wrote:

Larry Cable has updated the pull request incrementally with one additional 
commit since the last revision:

   JDK-8327246: updated jcmd.md to document -location flag
src/jdk.jcmd/share/man/jcmd.md line 808:

806:
807:     -   `-location`: (Optional) Print the location of the class file from 
which the class is loaded (if available)
808:          If provided by its defining ClassLoader, this option will print a 
URL specifying the location of the
I don't think this is an accurate description. The location comes from the 
`CodeSource` which comes from the `ProtectionDomain`, which is supplied to the 
`ClassLoader` when defining the Class.

If we want to be specific here then I would suggest:

If available from the Class (through its ProtectionDomain's CodeSource), this 
option will print ...
And if we don't want to be specific then:

If available, this option will print ...

Though user's may wonder what makes it available, and how to make it available.

I'm also wondering now whether this will show the "original" location, or the 
actual runtime location e.g CDS archive?

it depends on what CDS does with class static fields upon reification, I expect that it would report the original location...

@iklam can you comment pls, BTW should the VM.classes jcmd also be modified to report CDS membership/containment of a
loaded class?

- Larry


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

PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2699938273

Reply via email to