ResourceBundle textResources = null;
try {
textResources = ResourceBundle.getBundle("FooBarTextElements",
Locale.getDefault());
System.out.println(textResources.getString("CompanyName"));
} catch (MissingResourceException e) {
System.out.println("Unqualified resource bundle name");
}
try {
textResources = ResourceBundle.getBundle(
"com.foocompany.resources.FooBarTextElements",
Locale.getDefault());
System.out.println(textResources.getString("CompanyName"));
} catch (MissingResourceException e) {
}