Having a computer with the system property user.language set to de
, I would like to see the compiler messages in English.
In this post two methods are proposed for java8:
to use the
-Duser.language=en
switch on the command line, but-D
isn't shown in the list of available switches for javac 20 any more.to set an environment variable by the name JAVA_TOOL_OPTIONS under Windows. This, however, sets both java and javac to the desired language, but I would like only the compiler language to be changed.
Edit
The above mentioned post also tells trying -J-Duser.language=en
which is rejected at my site with Fehler: Ungültiges Kennzeichen: .language=en
which might read in English "Error: Invalid token/indicator: .language=en"
Edit 2
I accepted DuncG's answer, but the actual solution is in his comment to the original question. Thank you.