RFR: 8340133: Investigate if the java launcher could give hints about JShell [v2]

Eirik Bjørsnøs eirbjo at openjdk.org
Thu Oct 10 18:38:11 UTC 2024


On Thu, 10 Oct 2024 17:56:23 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> I've adjusted the concise help to:
> 
> ```
> $ java
> openjdk 24-internal 2025-03-18
> 
> Usage: java [java options...] <application> [application arguments...]
> ```

How about just `[arguments...]` instead of `[application arguments...]`?

It's shorter, in this context it is pretty clear that it is arguments to the application and it removes any confusion between `<application>`  and `application`.  (If you need to explain it you could add a "And [arguments..] is a list of inputs strings to the application" or something along those lines)

> ```
> Where <application> is one of:
>   <MainClass>                to execute the main method of a compiled class
>   -jar <jar-file.jar>        to execute the main class in a JAR archive
> ```

Nit: I would consider using "main class _of_ a JAR archive" here for consistency. Yes, the main class is a binary file stored as an entry _in_ a JAR archive. But so is the main class _of_ a module. The key thing here is that the Main-Class attribute designates it as the "main class" of the JAR archive. (But then I'm not a native English speaker..:)

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

PR Comment: https://git.openjdk.org/jdk/pull/21411#issuecomment-2405790480


More information about the core-libs-dev mailing list