RFR: 8364182: Add jcmd VM.security_properties command [v10]

Alan Bateman alanb at openjdk.org
Wed Feb 18 18:50:25 UTC 2026


On Wed, 18 Feb 2026 17:55:54 GMT, Kieran Farrell <kfarrell at openjdk.org> wrote:

>> The goal of this PR is to add a means of exposing security properties at runtime to aid the debugging security related issues/misconfigurations etc. Currently, only initial security properties set at start up can be exposed via the `InitialSecurityProperty` JFR event. 
>> 
>> This patch introduces a new jcmd diagnostic command `VM.properties`, which enables developers to print either the current system properties or security properties of a running Java process via command-line arguments (-system or -security). To avoid clutter within the jcmd command list, the old `VM.system_properties` command is hidden, but not removed so will not break existing usages. The implementation of each is shared to reduce duplication.
>
> Kieran Farrell has updated the pull request incrementally with one additional commit since the last revision:
> 
>   newline

src/hotspot/share/services/diagnosticCommand.hpp line 101:

> 99:     PrintSecurityPropertiesDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
> 100:     static const char* name() { return "VM.security_properties"; }
> 101:     static const char* description() { return "Print java.security.Security properties."; }

I think the command name and description is good as the "-security" option in the early iterations would have tripped up at least some people that aren't aware that java.security.Security properties are different thing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29124#discussion_r2823897718


More information about the core-libs-dev mailing list