The documentation covering the usage of wildcards in argfiles is confusing and easily misinterpretation.
https://docs.oracle.com/en/java/javase/18/docs/specs/man/java.html#java-command-line-argument-files
Specifically these two items
> The launcher doesn't expand wildcards that are present within an argument file.
> Wildcards (*) aren't allowed in these lists (such as specifying *.java).
Can be misinterpreted by users that arguments like the following:
-cp path/to/my/libs/* or -Xlog:gc*=info,heap*=info
Aren't allowed/wouldn't work because they include a wildcard. However the prohibition on wildcards is much more narrowly related to expansion that would be done by the shell.
Suggest the following:
Remove this line:
> The launcher doesn't expand wildcards that are present within an argument file.
And update this line:
> Wildcards (*) aren't allowed in these lists (such as specifying *.java).
Updated to be:
> Wildcards (*) aren't allowed for list expansion (such as specifying /*.java).
And with a sub-bullet:
> Wilcards are allowed in VM arguments like setting classpath (-cp /path/to/libs/*, or configuring VM logging -X:log:gc*=info)
https://docs.oracle.com/en/java/javase/18/docs/specs/man/java.html#java-command-line-argument-files
Specifically these two items
> The launcher doesn't expand wildcards that are present within an argument file.
> Wildcards (*) aren't allowed in these lists (such as specifying *.java).
Can be misinterpreted by users that arguments like the following:
-cp path/to/my/libs/* or -Xlog:gc*=info,heap*=info
Aren't allowed/wouldn't work because they include a wildcard. However the prohibition on wildcards is much more narrowly related to expansion that would be done by the shell.
Suggest the following:
Remove this line:
> The launcher doesn't expand wildcards that are present within an argument file.
And update this line:
> Wildcards (*) aren't allowed in these lists (such as specifying *.java).
Updated to be:
> Wildcards (*) aren't allowed for list expansion (such as specifying /*.java).
And with a sub-bullet:
> Wilcards are allowed in VM arguments like setting classpath (-cp /path/to/libs/*, or configuring VM logging -X:log:gc*=info)
- relates to
-
JDK-8344540 Remove superseded wildcard description from java manpage
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/5cb0d438
-
Review(master) openjdk/jdk/22208