What are the most common reasons for a java.util.MissingResourceException being thrown when using java.util.ResourceBundle.getBundle(String s, Locale locale)?
Reason 1: You need to create a ResourceBundle class for each locale that you wish to support. You also need to provide a default ResourceBundle, which will be used if no appropriate ResourceBundle class for a locale can be found. For example, you have created the ResourceBundle classes: Meals_fr_FR, Meals_db and Meals_en with a default ResourceBundle class, Meals. A java.util.MissingResourceException is thrown if for a given locale, you cannot find the nearest matching resource bundle for that locale, and you have failed to define a default ResourceBundle class. If a ResourceBundle does not exist for a specific locale, then getBundles will find the nearest match. For instance, if you want to find Meals_fr_FR_UNIX and the default locale is en_GB, then getBundle will look for ResourceBundles in the following order: Meals_fr_FR_UNIX Meals_fr_FR Meals_fr Meals_en_GB Meals_en Meals GetBundle will look and use ResourceBundles in the default locale before using the default ResourceBundle clas