On Thu, 9 Jul 2026 09:38:56 GMT, Jan Lahoda <[email protected]> wrote:

> The `java`' man page does not speak about the new forms of main method, this 
> PR updates it to include these new forms, and also generally updates the 
> text. This was noted and written by abuckley.
> 
> I am attaching images how the rendered man page looks in HTML and in a 
> terminal:
> <img width="2731" height="417" alt="html" 
> src="https://github.com/user-attachments/assets/6ebc5ff7-93cd-497a-bd52-a9045f520b68";
>  />
> <img width="3142" height="417" alt="man" 
> src="https://github.com/user-attachments/assets/bd09ac3a-95b3-46c5-87f9-4aae0fddb2bf";
>  />
> 
> 
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.base/share/man/java.md line 99:

> 97: By default, the first argument that isn't an option of the `java` command 
> indicates
> 98: the fully qualified name of the main class. If `-jar` is specified, then 
> its
> 99: argument is the name of the JAR file containing class and resource files 
> for the

Pre-existing: this doesn't account for the `-m` module mode.

src/java.base/share/man/java.md line 103:

> 101: the manifest of the JAR file.
> 102: 
> 103: Arguments after the main class name or the JAR file name are passed to

Pre-existing: this doesn't account for the `-m` module mode.

src/java.base/share/man/java.md line 104:

> 102: 
> 103: Arguments after the main class name or the JAR file name are passed to
> 104: the `main()` method. The `main()` method may be a static method or an 
> instance

I would suggest starting a new paragraph to describe what a `main` method may 
look like.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31841#discussion_r3555340748
PR Review Comment: https://git.openjdk.org/jdk/pull/31841#discussion_r3555341451
PR Review Comment: https://git.openjdk.org/jdk/pull/31841#discussion_r3555344261

Reply via email to