You can set it on the command line via JVM parameters:
java -Duser.country=CA -Duser.language=fr ... com.x.Main
For further information look at Internationalization: Understanding Locale in the Java Platform – Using Locale
More Related Contents:
- How can I get the current date and time in UTC or GMT in Java?
- Android: how to get the current day of the week (Monday, etc…) in the user’s language?
- How do I convert a String to Double in Java using a specific locale?
- Why does Java’s java.time.format.DateTimeFormatter#format(LocalDateTime) add a year?
- Java string searching ignoring accents
- Sort List of Strings with Localization
- How do I get localized date pattern string?
- A good date converter for Jalali Calendar in Java? [closed]
- en_US or en-US, which one should you use? [duplicate]
- Force 4-digit-year in localized strings generated from `DateTimeFormatter.ofLocalized…` in java.time
- How to move elements of Java ArrayList to file in java [closed]
- Generating Unique Random Numbers in Java
- Double vs. BigDecimal?
- How to read a specific line using the specific line number from a file in Java?
- Simple popup java form with at least two fields
- Sort a Map by values
- How to create a generic array in Java?
- Error creating bean with name ‘entityManagerFactory’ defined in class path resource : Invocation of init method failed
- What operations in Java are considered atomic?
- Preemptive Basic authentication with Apache HttpClient 4
- How can I replace non-printable Unicode characters in Java?
- Stand-alone Java code formatter/beautifier/pretty printer? [closed]
- Streaming large result sets with MySQL
- StringBuilder/StringBuffer vs. “+” Operator
- debug jdk source can’t watch variable what it is
- Java: If vs. Switch
- Properly closing SSLSocket
- Java execute a command with a space in the pathname
- Android – Having Provider authority in the app project
- How do I add the Java API documentation to Eclipse?