This is for a college project:I am using the Spring PropertyPlaceholderConfigurer to obtain values from a property file. I am updating the properties file from a GUI via the following code:\[code\]Properties prop = new Properties();FileOutputStream out = null;out = new FileOutputStream("pro.properties");prop.setProperty("durationpro", "wk");prop.store(out, null);out.flush();out.close();\[/code\]I have tried using two methods to get the updated file to work:http://www.wuenschenswert.net/wunschdenken/archives/127and I tried to refresh the context application directly after the file update\[code\]ApplicationContext f = new FileSystemXmlApplicationContext("Bean1.xml");((ConfigurableApplicationContext)f).refresh();\[/code\]My code\[code\]ApplicationContext context = new ClassPathXmlApplicationContext("Bean1.xml");BeanFactory factory = (BeanFactory) context;TestGUI t = (TestGUI) factory.getBean("testbean"); \[/code\]While the application is running (I don't have to close application) I have to manually open and close the properties file and then the change is recognised. This happens for both methodsThe xml file I am using for the spring refresh method is:\[code\] <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"><bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpathro.properties</value> </list> </property> </bean> <bean id="com" class="Domestic" /> <bean id="wk" class="Week" /><bean id="mth" class="Month" /><bean id="testbean" class="TestGUI"> <property name="customerType" ref="com" /> <property name="duration" ref="${durationpro}"/> </bean></beans>\[/code\]I copied the xml file exactly for the other Wunschdenken methodThanks for any help