Eclipse Plugin Dev and loading AppContext - problem1
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
Code:
ClassPathResource res = new ClassPathResource("appContext.xml");
XmlBeanFactory factory = new XmlBeanFactory(res);
the error is:
java.io.FileNotFoundException: Could not open class path resource [appContext.xml]
Same thing happens even if I state the whole classpath:
Code:
ClassPathResource res = new ClassPathResource("com/xyz/myapplication/appContext.xml");
XmlBeanFactory factory = new XmlBeanFactory(res);
the error is:
java.io.FileNotFoundException: Could not open class path resource [com/xyz/myapplication/appContext.xml]
Please help!!