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

David Holmes dholmes at openjdk.org
Tue Jan 13 05:42:16 UTC 2026


On Mon, 12 Jan 2026 18:41:07 GMT, Larry Cable <duke at openjdk.org> wrote:

>> modified the pre-existing VM.classes jcmd to add a 'location' option, that when specified, will (natively) attempt to obtain the value (if non-null) of the location URL of the CodeSource of each classes ProtectionDomain.
>> 
>> effectively:
>> 
>> someObject.getClass().getProtectionDomain().getCodeSource().getLocation().toExternalForm()
>> 
>> (where interim oops are null-checked)
>
> Larry Cable has updated the pull request incrementally with one additional commit since the last revision:
> 
>   JDK-8327246: added test for VM.classes -location as per lmesnik

src/hotspot/share/oops/instanceKlass.cpp line 2359:

> 2357:   // initialization state
> 2358: 
> 2359:   assert(!k->is_instance_klass(), "not InstanceKlass!");

Why are you asserting this here? This code seems to expect any kind of `Klass`.

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

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


More information about the hotspot-dev mailing list