Setting java locale settings

Simon Tucker picture Simon Tucker · Sep 15, 2008 · Viewed 141.5k times · Source

When I use the default java locale on my linux machine it comes out with the US locale settings, where do I change this so that it comes out with the correct locale?

Answer

Chris Broadfoot picture Chris Broadfoot · Sep 15, 2008

With the user.language, user.country and user.variant properties.

Example:

java -Duser.language=th -Duser.country=TH -Duser.variant=TH SomeClass