RFR: 8272728: javac ignores any -J option in @argfiles silently

Christian Stein cstein at openjdk.java.net
Tue Oct 12 14:22:03 UTC 2021


On Mon, 11 Oct 2021 14:57:55 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Okay. Which one do you prefer?
>> 
>> - `"-J is not valid here (e.g. in an @argfile)"` without the actual argument or
>> - `"-J%s is not valid here (e.g. in an @argfile)".formatted(arg)` with the actual argument included?
>
> Also, we tend not to use Latin contractions like `e.g.` and `i.e.` -- use the English equivalent, or avoid the need altogether.
> 
> Note that arg-files are not the only way to tunnel `-J` options into `javac`, so that may be another reason to generalize the message and make it less specific.   For example, `-J is not valid here; pass JVM options directly to the launcher.`

What about `"-J%s is not valid here; pass JVM options directly to the launcher.".formatted(arg)`?

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

PR: https://git.openjdk.java.net/jdk/pull/5891


More information about the compiler-dev mailing list