Issue with reloading resourcebundle

I am using the following code to reload the resourcebundle but still facing problems. Can anyone let me know what the issue is in the following

Class klass = ResourceBundle.class;

Field field = klass.getDeclaredField("cacheList");

field.setAccessible(true);

sun.misc.SoftCache cache = (sun.misc.SoftCache)field.get(null);

cache.clear();

field.setAccessible(false);

After performing the above if i call

ResourceBundle rb = ResourceBundle.getBundle("com.base.headerfilenames");

the new keys are not refected.

Any help would be appreciated.

headerfilenames is a .properties file

Message was edited by:

ssv45324

[694 byte] By [ssv45324a] at [2007-10-3 9:17:19]
# 1
Probably the properties file is cached in some other layer, such as the jar class loader. You could define a custom ClassLoader in which the cache can be disabled. But I'm not sure if it will really work.Masayoshi
okutsua at 2007-7-15 4:30:14 > top of Java-index,Desktop,I18N...