views:

190

answers:

1

Hi,

I want to load multiple property files from various packages as ResourceBundle. Can I achieve that in Java

+1  A: 

Extend java.util.PropertyResourceBundle and call setParent.

Tom Hawtin - tackline
private class ParentResourceHoleder extends ResourceBundle { @Override public Enumeration<String> getKeys() { // TODO Auto-generated method stub return null; } @Override protected Object handleGetObject(String key) { // TODO Auto-generated method stub return null; } @Override protected void setParent(ResourceBundle parent) { super.setParent(parent); } }java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key input.error
Nrusingha
Um, `extends java.util.PropertyResourceBundle`.
Tom Hawtin - tackline