RFR: 8327246: Add a jcmd diagnostic command to list the jar files loaded by a process [v8]

David Holmes dholmes at openjdk.org
Fri Jan 16 20:58:22 UTC 2026


On Fri, 16 Jan 2026 20:20:56 GMT, David Holmes <dholmes at openjdk.org> 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?

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

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


More information about the hotspot-dev mailing list