From 7371f3c1884d642ab74a8ee17b18f695806eebde Mon Sep 17 00:00:00 2001 From: Ivan Bereziuk Date: Fri, 23 Jan 2026 17:22:32 +0100 Subject: [PATCH] tweaked help working for -t flag --- src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java | 4 ++-- src/jdk.jcmd/share/man/jcmd.md | 2 +- test/jdk/sun/tools/jcmd/usage.out | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java index 07612622c4e..b3a61254dba 100644 --- a/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java +++ b/src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java @@ -123,11 +123,11 @@ class Arguments { } public static void usage() { - System.out.println("Usage: jcmd [-t] "); + System.out.println("Usage: jcmd <[-t] command ...|PerfCounter.print|-f file>"); System.out.println(" or: jcmd -l "); System.out.println(" or: jcmd <-h | --help> "); System.out.println(" "); - System.out.println(" -t flag ensures the dignostic command begins with a timestamp "); + System.out.println(" -t Show timestamp before running the command. "); System.out.println(" "); System.out.println(" command must be a valid jcmd command for the selected JVM. "); System.out.println(" Use the command \"help\" to see which commands are available. "); diff --git a/src/jdk.jcmd/share/man/jcmd.md b/src/jdk.jcmd/share/man/jcmd.md index 342056ed156..08e42b30ad4 100644 --- a/src/jdk.jcmd/share/man/jcmd.md +++ b/src/jdk.jcmd/share/man/jcmd.md @@ -49,7 +49,7 @@ jcmd - send diagnostic command requests to a running Java Virtual Machine Java processes with the specified name of the main class. `-t` -: When used, the diagnostic commands output starts with a timestamp. +: Show timestamp before running the command. *command* : The `command` must be a valid `jcmd` command for the selected JVM. The list diff --git a/test/jdk/sun/tools/jcmd/usage.out b/test/jdk/sun/tools/jcmd/usage.out index 406444d70de..ea7dfc8018d 100644 --- a/test/jdk/sun/tools/jcmd/usage.out +++ b/test/jdk/sun/tools/jcmd/usage.out @@ -1,8 +1,8 @@ -Usage: jcmd [-t] +Usage: jcmd <[-t] command ...|PerfCounter.print|-f file> or: jcmd -l or: jcmd <-h | --help> - -t flag ensures the dignostic command begins with a timestamp + -t Show timestamp before running the command. command must be a valid jcmd command for the selected JVM. Use the command "help" to see which commands are available.