RFR: 8364182: Add jcmd VM.properties command [v2]

Johannes Döbler duke at openjdk.org
Thu Jan 8 20:07:45 UTC 2026


On Thu, 8 Jan 2026 19:50:08 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
> 
>  - Merge remote-tracking branch 'origin/master' into sec_props2
>  - static helper method for both jcmd calls
>  - missing )
>  - working with single arg
>  - updates
>  - update args
>  - two args -not yet tested
>  - initial patch

src/java.base/share/classes/java/security/Security.java line 802:

> 800:     }
> 801: 
> 802:     static Properties getAllSecurityPropertiesReadOnly() {

is this method used?

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

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


More information about the core-libs-dev mailing list