Overriding the locale for JDB
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Thu Sep 2 09:56:59 UTC 2021
On 2021-09-02 07:01, Jakob Cornell wrote:
> Hi all,
>
> While working on changes for JBS 8271356 I spent some time testing on
> locales other than en-US and found something a bit odd. I can
> override the system default locale for JDB by setting the `LANG'
> environment variable (on Linux), and I can override the system locale
> for the debuggee by using `-Duser.language', but unless handling of
> `LANG' is implemented cross-platform in OpenJDK there doesn't seem to
> be a portable way of overriding the locale for JDB itself.
>
> The reason I bring this up is that I'm adding jtreg tests for my
> changes, and I'm trying to have them not depend on the system default
> locale (even though it seems the existing tests do). Wondering if I'm
> missing any better way to set the locale, in particular one that can
> be integrated into the `JdbTest' system. Looks like maybe all that's
> missing is a way to set system properties in JDB's VM, thus enabling
> use of `user.language'.
You can use -J to send options to the JVM, as in -J-Duser.language.
/Magnus
>
> Jakob
More information about the serviceability-dev
mailing list