Hello All,
I am creating a ResourceBundle to load the property files. My file structure looks like
|
—Main
|
----ResourceBundleLoad.java
|
–Resource
|
--- resourcebundle.properties
In normal when i put main class and the property file in same package means it retrieves all the property file values. If i separate both files means it’s not working. It throws java.util.MissingResourceException exception.
My code is
private static final String BUNDLE_NAME = "ExternalizedLogMessages";
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
Please suggest me how to solve this problem
I achieve this by using the class loader.
the source is