To access low-level resources java provides java.net.URL interface that is not adequate So There was need for some new technique like access a resource that needs to be obtained from class path, or relative to a ServletContext. So there are Built-in Resource implementations like URL Resource, classpath resource, FileSystemResource etc to fulfill particular purpose For Example the Following Code is used to Represents a classpath resource:

Java Code:
Resource res = new ClassPathResource("RmiSampleService.xml"); 
BeanFactory factory = new XmlBeanFactory(res);