I have a properties reload with my web server, using java 1.5 and tomcat 5.
Some properties are located in a folder included in the classpath ; when I start my application there isn't any problem and the properties are loaded as expected. When I manually change values in some files and call my reload method (see below), the new values are taken in account.
The problem is when the folder indicated in the classpath is removed and then replaced with the new files, my reload method doesn't work anymore and I have to restart my application to take the new files in account. I don't know if it helps but when I'm in my folder during the replacement of the files, I have to go out of this folder and go back in it to see the files. Example, in myFolder I do ls -la ==> nothing, then cd ../myFolder and ls -la ==> I can see the files.

Here is my reload method (sorry for the french comments ;) :
Java Code:
boolean isOk = true;
		// Vide le cache des bundles en mémoire.
		try {
			Class<ResourceBundle> type = ResourceBundle.class;
			Field cacheList = type.getDeclaredField("cacheList");
		}catch (Exception exc){
			isOk = false;
			// Impossible de vider le cache des bundles.
			System.out.println("[Help][reloadHelpSystem] Unable to empty" +
					" bundles' cache: " + exc.getMessage());
		// Recharge le classpath Tomcat.
		try {
			ClassLoader loader = Thread.currentThread().getContextClassLoader();
			Class<? extends ClassLoader> loaderClass = loader.getClass();
			if ("org.apache.catalina.loader.WebappClassLoader".equals(
					loaderClass.getName())) {
				// Récupère le cache du classPath.
				Field field = loaderClass.getDeclaredField("resourceEntries");
				Object cache = field.get(loader);
				Class<? extends Object> cacheClass = cache.getClass();

				// Vide le cache du classPath.
				Method clearMethod = cacheClass.getMethod("clear", (Class[]) null);
				clearMethod.invoke(cache, (Object[]) null);
		} catch (Exception exc) {
			isOk = false;
			// Impossible de recharger le classPath.
			System.out.println("[Help][reloadHelpSystem] Unable to reload" +
					" Tomcat's classpath: " + exc.getMessage());
		return isOk;
Any help would be great, I have a hard time finding a solution to this problem !