How to configure ResourceBundle "no fallback" in Java 9

As pointed out in StackOverflow question , you can tweak in Java 8 or older to not deviate from the default language:

ResourceBundle.getBundle("MyResources",
  new Locale("en", "US"),
  ResourceBundle.Control.getNoFallbackControl(ResourceBundle.Control.FORMAT_PROPERTIES))

      

In Java 9, ResourceBundle.Control uses throw UnsupportedOperationException

when used in named modules: ResourceBundle.Control

is not supported in named modules.

How do I implement / configure a custom "MyResourcesProvider [Impl]" to achieve the same behavior as ResourceBundle.Control.getNoFallbackControl

?

+3
internationalization java-9 resourcebundle


source to share


No one has answered this question yet

See similar questions:

4
How to ignore locale system standard to retrieve resourceBundle

or similar:

686
How to resolve java.lang.NoClassDefFoundError: javax / xml / bind / JAXBException in Java 9
671
Why does the array [idx ++] + = "a" increase idx once in Java 8, but twice in Java 9 and 10?
196
How to use UTF-8 in resource properties using ResourceBundle
8
Localization in Perl using gettext and Locale :: TextDomain with return if Locale :: TextDomain is not available
five
Download ResourceBundle in OSGi Bundle
4
When Java 9 modular system integrates into Maven how to handle auto module
2
How to override some resources from PropertyResourceBundle
0
Unable to get ResourceBundle to find bundle. How can I debug this?
0
Custom ResourceBundle in ADF with one class
0
Java ResourceBundle Location (outside jar / retreat inside jar)



All Articles
Loading...
X
Show
Funny
Dev
Pics