On Tue, 14 Jul 2026 05:43:59 GMT, Guanqiang Han <[email protected]> wrote:
>> Please review this change, thanks! >> >> **Description:** >> >> `java -XshowSettings` without an application currently prints the requested >> settings, then prints usage information and exits with code 1. >> >> **Solution:** >> >> Treat `-XshowSettings` as an option that can be used without an application >> target. During argument parsing, do not mark the absence of a main class or >> JAR file as an error when `-XshowSettings` is specified. After the settings >> and any explicitly requested launcher output have been processed, exit >> normally if no application was provided. >> >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Guanqiang Han has updated the pull request incrementally with one additional > commit since the last revision: > > Update -XshowSettings documentation src/java.base/share/native/libjli/java.c line 555: > 553: if (showSettings != NULL && what == NULL) { > 554: LEAVE(); > 555: } Can't we do this back at line 501 after showing the settings? test/jdk/tools/launcher/Settings.java line 331: > 329: TestResult tr = doExec(javaCmd, > 330: "-Duser.language=en", > 331: "-Duser.country=US", Why do we need these? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31891#discussion_r3576933225 PR Review Comment: https://git.openjdk.org/jdk/pull/31891#discussion_r3576952886
