Currently my System Locale is en-UK
, it used to be en-US
(I've restarted my computer for this change to be in effect)
When I print Locale.getDefault().getCountry().toString()
I still get US though.
In the API it states:
getDefault()
Gets the current value of the default locale for this instance of the Java Virtual Machine.
Maybe the JVM locale is not related to the system locale? If so, how do I get the system locale on Windows?
Edits:
I realized in production an argument WAS being set that altered the Locale.getDefault() return value. This was difficult to check/prove.
My solution was that the user.country and user.language were not changed and reflected the actual Locale.
Locale locale = new Locale(System.getProperty("user.language"),System.getProperty("user.country"));
Locale.setDefault(locale);
//this will do the trick for me
Big thanks to everyone who answered and commented.