Totally new to java and and struggling.
I need to get the user preferred language
I did the following
Locale userPreferredLocale = Locale.getDefault() ;
However the above despite my Language being "da-DK" it always gets "en-GB"
so I tried the the following which I think will return the correct user language String locale = System.getProperty("user.language"); System.out.println("The Locale of the system is: "+locale);
However now I crash with java.security.AccessControlException: access denied (java.util.PropertyPermission user.language read) What do I need to do so that I have full rights? Do I need to create a file and put it somewhere ?
Can you help? Thanks