I am developing a standalone application using eclipse as a rich client.
I tried many ways to load my application context .xml file, but could only succeed using FileSystemXmlApplicationContext, with which I have to use the whole filesystem path as input : "e:/workspace/com/xyz/myapplication/appContext.xml"
If I use
the error is:Code:ClassPathResource res = new ClassPathResource("appContext.xml"); XmlBeanFactory factory = new XmlBeanFactory(res);
java.io.FileNotFoundException: Could not open class path resource [appContext.xml]
Same thing happens even if I state the whole classpath:
the error is:Code:ClassPathResource res = new ClassPathResource("com/xyz/myapplication/appContext.xml"); XmlBeanFactory factory = new XmlBeanFactory(res);
java.io.FileNotFoundException: Could not open class path resource [com/xyz/myapplication/appContext.xml]
Please help!!


Reply With Quote