Thanks
Jesper de Jong
and sorry for coming with one new confusion
but after reading certain things i have confused
as you posted before
ClassPathResource looks for the resource on the classpath, FileSystemResource looks for it in the file system
what do u mean by classpath it is little confusing
consider following code
when i commented statement 1 and use 2nd statement it gives me Exception
C:\SPRING~2>java HelloClient vhff
please Wait.
15-Nov-2005 14:00:27 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [c:/hello.xml]
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path re
source [c:/hello.xml]; nested exception is java.io.FileNotFoundException: class path resource [c:/hello.xml] cannot
be opened because it does not exist
Exception in
thread "main" java.lang.NullPointerException
at HelloClient.main(HelloClient.java:31)
when i commented statement 2 and use 1st statement it gives me output
my Question is what is the meaning of classpath regarding this because when i copy the file ("hello.xml") in the same folder as that of the class and used statement 2 with slight modification it gives me no error
ApplicationContext cont=new ClassPathXmlApplicationContext
("hello.xml");